Use a saner pool hash resize hint
- The previous size hint would actually cause us to shrink the hash bucket allocation, requiring the hash to resize itself immediately afterwards. As if the rehashes weren't expensive enough already...
This commit is contained in:
parent
57f9d42a0e
commit
95329e10be
|
@ -82,7 +82,7 @@ void rpmstrPoolUnfreeze(rpmstrPool pool)
|
||||||
{
|
{
|
||||||
if (pool) {
|
if (pool) {
|
||||||
if (pool->hash == NULL) {
|
if (pool->hash == NULL) {
|
||||||
int sizehint = (pool->offs_size / 2) - 1;
|
int sizehint = pool->offs_size * 2;
|
||||||
if (sizehint < STRHASH_INITSIZE)
|
if (sizehint < STRHASH_INITSIZE)
|
||||||
sizehint = STRHASH_INITSIZE;
|
sizehint = STRHASH_INITSIZE;
|
||||||
pool->hash = strHashCreate(sizehint, rstrhash, strcmp, NULL, NULL);
|
pool->hash = strHashCreate(sizehint, rstrhash, strcmp, NULL, NULL);
|
||||||
|
|
Loading…
Reference in New Issue