diff options
author | Dan McGee <dan@archlinux.org> | 2011-01-22 21:29:02 +0100 |
---|---|---|
committer | Dan McGee <dan@archlinux.org> | 2011-01-22 23:34:42 +0100 |
commit | 27e8f06e0335ca560a3d0a261cc1979dbc1caad9 (patch) | |
tree | 20493b902d45af7c0cb6ec269d21fc3adb70e9af /contrib/.gitignore | |
parent | 4d291508c2c24d058d0e00ca9588c6c81b24bc92 (diff) | |
download | pacman-27e8f06e0335ca560a3d0a261cc1979dbc1caad9.tar.gz pacman-27e8f06e0335ca560a3d0a261cc1979dbc1caad9.tar.xz |
Query fileowner performance improvements
Clean up some of the code by doing less string copying and printing. This is
accomplished by either doing it after we know we need it, or taking
advantage of the fact that some strings never change such as the root
directory prefix. Also, fix an issue where a file at the root level (e.g.
/foobar) could not be queried.
End result is a much faster user experience when combined with the
mbasename() changes. These timings are for looking up 113 files in /etc/,
some of which are owned and some which are not.
$ find /etc -maxdepth 1 -type f | xargs time pacman -Qo >/dev/null
6.10user 0.05system 0:06.17elapsed 99%CPU (0avgtext+0avgdata 131040maxresident)k
0inputs+0outputs (0major+9436minor)pagefaults 0swaps
$ find /etc -maxdepth 1 -type f | xargs time ./src/pacman/.libs/lt-pacman -Qo >/dev/null
0.86user 0.04system 0:00.92elapsed 99%CPU (0avgtext+0avgdata 131120maxresident)k
0inputs+0outputs (0major+9436minor)pagefaults 0swaps
I'll take a 600% increase in speed.
Signed-off-by: Dan McGee <dan@archlinux.org>
Diffstat (limited to 'contrib/.gitignore')
0 files changed, 0 insertions, 0 deletions