diff options
author | Guillem Jover <guillem@debian.org> | 2014-09-26 05:45:25 +0200 |
---|---|---|
committer | Guillem Jover <guillem@debian.org> | 2014-10-06 02:08:04 +0200 |
commit | 3eab05ef9de9959c0e67f23d020ed1fa06b16d49 (patch) | |
tree | 6c5f85f326c723cf18cd0af3b0ac65e10e2e9385 /src | |
parent | 67c4ac7e7a9c8a8c20d0796b5a58e8f4797c3d7b (diff) | |
download | dpkg-3eab05ef9de9959c0e67f23d020ed1fa06b16d49.tar.gz |
dpkg: Double the filesdb hash table size to the closest 2^18 prime
Times have changed, and it's common to have at least these many files.
This reduces the amount of collisions. Eventually we should switch to
dynamically growing hash tables.
Diffstat (limited to 'src')
-rw-r--r-- | src/filesdb.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/filesdb.c b/src/filesdb.c index 9c8780e46..fc8dd55fc 100644 --- a/src/filesdb.c +++ b/src/filesdb.c @@ -525,8 +525,8 @@ struct fileiterator { }; /* This must always be a prime for optimal performance. - * This is the closest one to 2^17 (131072). */ -#define BINS 131071 + * This is the closest one to 2^18 (262144). */ +#define BINS 262139 static struct filenamenode *bins[BINS]; |