diff options
author | Dan McGee <dan@archlinux.org> | 2011-10-14 14:50:58 -0500 |
---|---|---|
committer | Dan McGee <dan@archlinux.org> | 2011-10-14 14:58:12 -0500 |
commit | ae25167bcd592186749b79ea31b10fb78ed9fb2d (patch) | |
tree | 67b5239b72f4ebdc74aafba70a6d7ac722501c7e /contrib/bacman.in | |
parent | bf84dc4cf1b925cc3ac1fb3185efc50a21802ba4 (diff) | |
download | pacman-ae25167bcd592186749b79ea31b10fb78ed9fb2d.tar.xz |
Large performance improvement for check for owned directories
We can take a large shortcut here that saves us a lot of time,
especially when upgrading packages with lots of directories. Obviously
iterating the full file list of every single package to determine if
this directory was present in any other package can take quite some time
on a system with many packages installed. We don't need to remove a
directory at all if we are upgrading a package and the version we are
moving to still had the directory.
Also make a small optimization on the package comparsion- we really only
care about equality here, not the result of the compare, so we can
shortcut using our name_hash.
What kind of benefit does this give us? Oh, only a reduction from 295.7
million to 1.4 million strcmp() calls (99.5% fewer) during a
`pacman -S linux libreoffice-common` operation.
Signed-off-by: Dan McGee <dan@archlinux.org>
Diffstat (limited to 'contrib/bacman.in')
0 files changed, 0 insertions, 0 deletions