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-25 23:46:59 +0100
commit71eee4adbcda1d9e75cbce58045d03ea12432431 (patch)
tree77abe0a7905aa31af1a23169d0709e5246e7895f /meta/recipes-devtools/build-compare/build-compare_git.bb
parent79c574979f64f2dbe8ca05774446de21a53b3a87 (diff)
downloadopenembedded-core-contrib-71eee4adbcda1d9e75cbce58045d03ea12432431.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. Signed-off-by: Robert Yang <liezhi.yang@windriver.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
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 \
file://Ignore-DWARF-sections.patch;striplevel=1 \
file://0001-Add-support-for-deb-and-ipk-packaging.patch \
file://functions.sh-remove-space-at-head.patch \
+ file://functions.sh-run-rpm-once-to-make-it-faster.patch \
"
SRCREV = "c5352c054c6ef15735da31b76d6d88620f4aff0a"