summaryrefslogtreecommitdiffstats
path: root/meta/recipes-devtools/build-compare/build-compare_git.bb
diff options
context:
space:
mode:
authorRobert Yang <liezhi.yang@windriver.com>2016-07-17 20:32:43 -0700
committerRichard Purdie <richard.purdie@linuxfoundation.org>2016-07-26 08:56:28 +0100
commitfef5ae147e883743ee0e3ba2d3e4b547137c8984 (patch)
tree69f8e77e1355f42531965a0f58990573a87a5b1a /meta/recipes-devtools/build-compare/build-compare_git.bb
parent495e2f80a99f73d751349dc140908b4c6078ae96 (diff)
downloadpoky-fef5ae147e883743ee0e3ba2d3e4b547137c8984.tar.gz
build-compare: make pkg-diff.sh 75% faster
The rpm tool is a heavy process, pkg-diff.sh ran 16 (or 17 for kernel) "rpm -qp" times when the pkgs are identical, now we only run "rpm -qp --qf <all we need>" twice (one is for old pkg, and one is for new), save the results to spec_old and spec_new, then use sed command to get what we need later, this can make it 75% faster when the pkgs are identical. Here is the rough data on my host Ubuntu 14.04.4, 32 cores CPU and 128G mem: * When the pkgs are identical: - Before the patch: 1s - After the patch: 0.26s I compare the whole spec firstly, and return 0 if they are the same, or go on checking one by one if not, without this, it would be 0.46s, the gain is great when there are lot of packages, usually, we have more than 10,000 rpms to compare. * When the pkgs are different: That depends on where is the different, if the different is at the comparing rpmtags stage: - Before the patch: 0.26s - After the patch: 0.29s Increased 0.03s, but if the different is happend later than comparing rpmtags, it will save time. (From OE-Core rev: 71eee4adbcda1d9e75cbce58045d03ea12432431) Signed-off-by: Robert Yang <liezhi.yang@windriver.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-devtools/build-compare/build-compare_git.bb')
-rw-r--r--meta/recipes-devtools/build-compare/build-compare_git.bb1
1 files changed, 1 insertions, 0 deletions
diff --git a/meta/recipes-devtools/build-compare/build-compare_git.bb b/meta/recipes-devtools/build-compare/build-compare_git.bb
index 88996e27f8..9ec8c2392f 100644
--- a/meta/recipes-devtools/build-compare/build-compare_git.bb
+++ b/meta/recipes-devtools/build-compare/build-compare_git.bb
@@ -10,6 +10,7 @@ SRC_URI = "git://github.com/openSUSE/build-compare.git \
10 file://Ignore-DWARF-sections.patch;striplevel=1 \ 10 file://Ignore-DWARF-sections.patch;striplevel=1 \
11 file://0001-Add-support-for-deb-and-ipk-packaging.patch \ 11 file://0001-Add-support-for-deb-and-ipk-packaging.patch \
12 file://functions.sh-remove-space-at-head.patch \ 12 file://functions.sh-remove-space-at-head.patch \
13 file://functions.sh-run-rpm-once-to-make-it-faster.patch \
13 " 14 "
14 15
15SRCREV = "c5352c054c6ef15735da31b76d6d88620f4aff0a" 16SRCREV = "c5352c054c6ef15735da31b76d6d88620f4aff0a"