diff options
author | Robert Yang <liezhi.yang@windriver.com> | 2016-07-17 20:32:43 -0700 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2016-07-25 23:46:59 +0100 |
commit | 71eee4adbcda1d9e75cbce58045d03ea12432431 (patch) | |
tree | 77abe0a7905aa31af1a23169d0709e5246e7895f /meta/recipes-rt | |
parent | 79c574979f64f2dbe8ca05774446de21a53b3a87 (diff) | |
download | openembedded-core-71eee4adbcda1d9e75cbce58045d03ea12432431.tar.gz openembedded-core-71eee4adbcda1d9e75cbce58045d03ea12432431.tar.bz2 openembedded-core-71eee4adbcda1d9e75cbce58045d03ea12432431.zip |
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-rt')
0 files changed, 0 insertions, 0 deletions