Send patches - preferably formatted by git format-patch - to patches at archlinux32 dot org.
summaryrefslogtreecommitdiff
path: root/acinclude.m4
diff options
context:
space:
mode:
authorChantry Xavier <shiningxc@gmail.com>2007-11-25 16:13:56 -0600
committerDan McGee <dan@archlinux.org>2007-11-25 16:13:56 -0600
commitd683033d3ea79956faf8786f784ce2e271179892 (patch)
treebf8578705e8907b38bb95cedff77be1dd41e1ce8 /acinclude.m4
parent11133da587ebc1c78478cfcd05d5e8298bd61b84 (diff)
pacman/query.c : -Qo optimization.
I didn't understand why realpath was called on every files of every filelist in query_fileowner : ppath = resolve_path(path); It turns out this is needed for the diverted files. For example, cddb_get installs /usr/lib/perl5/site_perl/5.8.8/CDDB_get.pm which actually ends in /usr/lib/perl5/site_perl/current/CDDB_get.pm . And for making pacman -Qo /usr/lib/perl5/site_perl/current/CDDB_get.pm , realpath has to be called on both the target, and the file in the filelist. However, realpath is costly, and calling it on every single file resulted in a poor -Qo performance. Worst case : pacman -Qo /lib/libz.so.1 0.35s user 1.51s system 99% cpu 1.864 total So I did a little optimization to avoid calling realpath as much as possible: first compare the basename of each file. Result: src/pacman/pacman -Qo /lib/libz.so.1 0.24s user 0.05s system 99% cpu 0.298 total Obviously, the difference will be even bigger at the first run (no fs cache), though it's quite scary on my system : 1.7s vs 40s previously. Signed-off-by: Chantry Xavier <shiningxc@gmail.com> Signed-off-by: Dan McGee <dan@archlinux.org>
Diffstat (limited to 'acinclude.m4')
0 files changed, 0 insertions, 0 deletions