Send patches - preferably formatted by git format-patch - to patches at archlinux32 dot org.
summaryrefslogtreecommitdiff
path: root/contrib/zsh_completion.in
diff options
context:
space:
mode:
authorDan McGee <dan@archlinux.org>2010-12-14 22:26:23 -0600
committerDan McGee <dan@archlinux.org>2010-12-21 14:58:17 -0600
commitf2dff0860053f45c91e4ee301fda091a6b3d7361 (patch)
treea62d43b8041f172a67b1c0e0d2ca8336ea698fee /contrib/zsh_completion.in
parent126f50ab0b5ee3ed46c5a6ecae241e8af49b0fe2 (diff)
Overhaul archive fgets function
The old function was written in a time before we relied on it for nearly every operation. Since then, we have switched to the archive backend and now fast parsing is a big deal. The former function made a per-character call to the libarchive archive_read_data() function, which resulted in some 21 million calls in a typical "load all sync dbs" operation. If we instead do some buffering of our own and read the blocks directly, and then find our newlines from there, we can cut out the multiple layers of overhead and go from archive to parsed data much quicker. Both users of the former function are switched over to the new signature, made easier by the macros now in place in the sync backend parsing code. Performance: for a `pacman -Su` (no upgrades available), _alpm_archive_fgets() goes from being 29% of the total time to 12% The time spent on the libarchive function being called dropped from 24% to 6%. This pushes _alpm_pkg_find back to the title of slowest low-level function. Signed-off-by: Dan McGee <dan@archlinux.org>
Diffstat (limited to 'contrib/zsh_completion.in')
0 files changed, 0 insertions, 0 deletions