diff options
author | Dan McGee <dan@archlinux.org> | 2011-01-21 10:11:59 -0600 |
---|---|---|
committer | Dan McGee <dan@archlinux.org> | 2011-01-21 10:11:59 -0600 |
commit | 3863e48788e2424c4f1469e72dabda6fba595c4c (patch) | |
tree | 21df7160f1f90801d9372cd87ac31857dae5863f /lib/libalpm/po/hu.po | |
parent | c86ff120c870a2d0e0427567ae7449e23ad42954 (diff) | |
download | pacman-3863e48788e2424c4f1469e72dabda6fba595c4c.tar.xz |
Add a likely_pkg hint argument to sync_db_read
In most (all?) cases, we will process all files for a given sync database
entry sequentially. The code currently does an _alpm_pkg_find() for every
file in the database, but we had the "current" package readily available.
Shift some local variables around a bit to expose this to sync_db_read() and
use it if the package is the correct one.
On my system, this cuts calls to _alpm_pkg_find() from 20,769 to 10,349
calls during a -Qu operation, and results in a ~30% speedup of the same
operation (0.35 sec -> 0.27 sec). This benefit should be apparent anywhere
we read in the full contents of the sync databases.
Signed-off-by: Dan McGee <dan@archlinux.org>
Diffstat (limited to 'lib/libalpm/po/hu.po')
0 files changed, 0 insertions, 0 deletions