From 94cbc6392dc0cc78ed70cf3639bb0dc09ea32714 Mon Sep 17 00:00:00 2001 From: Michael Eischer Date: Sun, 23 Apr 2023 11:33:21 +0200 Subject: [PATCH] restore: slightly reduce memory usage while restoring files The information which target files are contained in a pack file is no longer necessary after processing a pack. --- internal/restorer/filerestorer.go | 2 ++ 1 file changed, 2 insertions(+) diff --git a/internal/restorer/filerestorer.go b/internal/restorer/filerestorer.go index 75a19b4fb..3bb7489ba 100644 --- a/internal/restorer/filerestorer.go +++ b/internal/restorer/filerestorer.go @@ -181,6 +181,8 @@ func (r *fileRestorer) restoreFiles(ctx context.Context) error { wg.Go(func() error { for _, id := range packOrder { pack := packs[id] + // allow garbage collection of packInfo + delete(packs, id) select { case <-ctx.Done(): return ctx.Err()