From d43fe1a282e4c7e46ab2b3eb2b3849c9e55652d1 Mon Sep 17 00:00:00 2001 From: Gilbert Chen Date: Mon, 9 Dec 2019 22:45:16 -0500 Subject: [PATCH] Release the list of chunk hashes after processing each snapshot. The chunk hash list isn't needed any more after being consolidated. Releasing it immediately after use helps reduce the memory usage. --- src/duplicacy_backupmanager.go | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/duplicacy_backupmanager.go b/src/duplicacy_backupmanager.go index 2e0d71a..2fa3fa2 100644 --- a/src/duplicacy_backupmanager.go +++ b/src/duplicacy_backupmanager.go @@ -1668,6 +1668,8 @@ func (manager *BackupManager) CopySnapshots(otherManager *BackupManager, snapsho chunks[chunkHash] = true } } + + snapshot.ChunkHashes = nil } otherChunkFiles, otherChunkSizes := otherManager.SnapshotManager.ListAllFiles(otherManager.storage, "chunks/")