From b8c03fd014082d3d0eb4c154e71701b4885fef1c Mon Sep 17 00:00:00 2001 From: John Sully Date: Sun, 28 Mar 2021 17:59:02 +0000 Subject: [PATCH] Excessive rehashing adds latency Former-commit-id: 9db2277b0fea032abcde089f617fe7e4f5ce12e3 --- src/dict.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/dict.cpp b/src/dict.cpp index 4b9f0f6d1..9acc01dc5 100644 --- a/src/dict.cpp +++ b/src/dict.cpp @@ -546,7 +546,7 @@ int dictRehashMilliseconds(dict *d, int ms) { static void _dictRehashStep(dict *d) { unsigned iterators; __atomic_load(&d->iterators, &iterators, __ATOMIC_RELAXED); - if (iterators == 0) dictRehash(d,2); + if (iterators == 0) dictRehash(d,1); } /* Add an element to the target hash table */