mirror of
https://github.com/moparisthebest/pacman
synced 2025-01-10 13:28:12 -05:00
Change default sync hash table sizing to 66% full
Since the sync database never changes size once we initialize it, we allow it to be filled a bit more. This reduces the overall memory footprint needed by the hash table. Signed-off-by: Dan McGee <dan@archlinux.org>
This commit is contained in:
parent
ce54715112
commit
021085624e
@ -232,8 +232,8 @@ static int sync_db_populate(pmdb_t *db)
|
||||
}
|
||||
est_count = estimate_package_count(&buf, archive);
|
||||
|
||||
/* initialize hash at 50% full */
|
||||
db->pkgcache = _alpm_pkghash_create(est_count * 2);
|
||||
/* initialize hash at 66% full */
|
||||
db->pkgcache = _alpm_pkghash_create(est_count * 3 / 2);
|
||||
|
||||
while(archive_read_next_header(archive, &entry) == ARCHIVE_OK) {
|
||||
const struct stat *st;
|
||||
|
Loading…
Reference in New Issue
Block a user