rehash MS does too little work before checking the time
Former-commit-id: 3e57b5c961f7dd91ddb24331eba9a3fa39b08fdd
This commit is contained in:
parent
5fd848eedc
commit
fd7a278eea
@ -242,8 +242,8 @@ int dictRehashMilliseconds(dict *d, int ms) {
|
||||
long long start = timeInMilliseconds();
|
||||
int rehashes = 0;
|
||||
|
||||
while(dictRehash(d,100)) {
|
||||
rehashes += 100;
|
||||
while(dictRehash(d,1000)) {
|
||||
rehashes += 1000;
|
||||
if (timeInMilliseconds()-start > ms) break;
|
||||
}
|
||||
return rehashes;
|
||||
|
Loading…
x
Reference in New Issue
Block a user