diff options
author | Aaron Griffin <aaron@archlinux.org> | 2007-01-17 04:57:53 +0100 |
---|---|---|
committer | Aaron Griffin <aaron@archlinux.org> | 2007-01-17 04:57:53 +0100 |
commit | 726e90dc2c860ee6893df29f9d8cf9c886fdd66d (patch) | |
tree | a8449f5567ec0ec13e94b8af3695bda2b417f692 /lib/libalpm/util.h | |
parent | 2e352141d793e00b6a5b4a6f1efabc2ef8142c0c (diff) | |
download | pacman-726e90dc2c860ee6893df29f9d8cf9c886fdd66d.tar.gz pacman-726e90dc2c860ee6893df29f9d8cf9c886fdd66d.tar.xz |
Jürgen Hötzel <juergen@hoetzel.info>
* avoid repeated regex compilations (regex for search string do not
change while scanning the package database)
* remove needless string duplication (regex function do not change target
string nor free them)
* code cleanup
This patch improves search performance:
bash-3.2$ time ./src/pacman/pacman.static.old -Ss "(database|web).*server" >/dev/null
real 0m1.026s
user 0m0.544s
sys 0m0.208s
bash-3.2$ time ./src/pacman/pacman.static -Ss "(database|web).*server" >/dev/null
real 0m0.777s
user 0m0.456s
sys 0m0.128s
bash-3.2$
Diffstat (limited to 'lib/libalpm/util.h')
-rw-r--r-- | lib/libalpm/util.h | 1 |
1 files changed, 0 insertions, 1 deletions
diff --git a/lib/libalpm/util.h b/lib/libalpm/util.h index 978de9e7..cda65a3a 100644 --- a/lib/libalpm/util.h +++ b/lib/libalpm/util.h @@ -70,7 +70,6 @@ int _alpm_runscriptlet(char *util, char *installfn, char *script, char *ver, cha int _alpm_check_freespace(pmtrans_t *trans, pmlist_t **data); #endif #endif -int _alpm_reg_match(char *string, char *pattern); void _alpm_time2string(time_t t, char *buffer); #ifdef __sun__ char* strsep(char** str, const char* delims); |