1
0
Fork 0
mirror of https://github.com/borgbackup/borg.git synced 2025-02-23 14:41:43 +00:00

Merge pull request #1298 from ThomasWaldmann/borg-check-hash-load

fix/optimize initial hash table size for borg check
This commit is contained in:
enkore 2016-07-09 17:44:10 +02:00 committed by GitHub
commit 1e32ed1553

View file

@ -826,7 +826,7 @@ def init_chunks(self):
""" """
# Explicitly set the initial hash table capacity to avoid performance issues # Explicitly set the initial hash table capacity to avoid performance issues
# due to hash table "resonance" # due to hash table "resonance"
capacity = int(len(self.repository) * 1.2) capacity = int(len(self.repository) * 1.35 + 1) # > len * 1.0 / HASH_MAX_LOAD (see _hashindex.c)
self.chunks = ChunkIndex(capacity) self.chunks = ChunkIndex(capacity)
marker = None marker = None
while True: while True: