From 103dbb9fd14fde35e116819808e6d4c9b534eaa2 Mon Sep 17 00:00:00 2001 From: Aaron Griffin Date: Tue, 13 Feb 2007 08:15:38 +0000 Subject: * Refactored conflict checking within packages. Profiling from Dan showed an unbelievable amount of strcmp() calls (25 million) due to the list searching. This has been reimplemented with a set-intersection scheme, due to the fact that file lists are always ordered. - NEEDS TESTING * Minor clean up, "globalized" the str_cmp helper to match the alpm comparison signature, so we can use it elsewhere. --- lib/libalpm/util.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'lib/libalpm/util.h') diff --git a/lib/libalpm/util.h b/lib/libalpm/util.h index 4de9f5d8..0eb1d3d4 100644 --- a/lib/libalpm/util.h +++ b/lib/libalpm/util.h @@ -71,6 +71,8 @@ int _alpm_check_freespace(pmtrans_t *trans, alpm_list_t **data); #endif #endif void _alpm_time2string(time_t t, char *buffer); +int _alpm_str_cmp(const void *s1, const void *s2); + #ifdef __sun__ char* strsep(char** str, const char* delims); char* mkdtemp(char *template); -- cgit v1.2.3-54-g00ecf