Skip to content
Permalink
Browse files

Fix a memory issue that check -tabular uses too much memory with many…

… revisions

The call to GetSnapshotChunks in ShowStatisticsTabular sets keepChunkHashes to
true -- this can cause too much memory consumption with hundreds of revisions.
  • Loading branch information...
gilbertchen committed Apr 21, 2019
1 parent abcb4d7 commit 4b69c1162e442ae62c961344a037830c30ac24e1
Showing with 2 additions and 2 deletions.
  1. +2 −2 src/duplicacy_snapshotmanager.go
@@ -998,7 +998,7 @@ func (manager *SnapshotManager) ShowStatisticsTabular(snapshotMap map[string][]*
earliestSeenChunks := make(map[string]int)

for _, snapshot := range snapshotList {
for _, chunkID := range manager.GetSnapshotChunks(snapshot, true) {
for _, chunkID := range manager.GetSnapshotChunks(snapshot, false) {
if earliestSeenChunks[chunkID] == 0 {
earliestSeenChunks[chunkID] = math.MaxInt32
}
@@ -1009,7 +1009,7 @@ func (manager *SnapshotManager) ShowStatisticsTabular(snapshotMap map[string][]*
for _, snapshot := range snapshotList {

chunks := make(map[string]bool)
for _, chunkID := range manager.GetSnapshotChunks(snapshot, true) {
for _, chunkID := range manager.GetSnapshotChunks(snapshot, false) {
chunks[chunkID] = true
snapshotChunks[chunkID] = true
}

2 comments on commit 4b69c11

@gilbertchen

This comment has been minimized.

Copy link
Owner Author

replied Apr 21, 2019

This commit has been mentioned on Duplicacy Forum. There might be relevant details there:

https://forum.duplicacy.com/t/memory-usage-problems/1980/13

@gilbertchen

This comment has been minimized.

Copy link
Owner Author

replied May 7, 2019

This commit has been mentioned on Duplicacy Forum. There might be relevant details there:

https://forum.duplicacy.com/t/check-command-fails-with-invalid-options/2034/5

Please sign in to comment.
You can’t perform that action at this time.