Merge pull request #3879 from MichaelEischer/mem-optimize

Some random (minor) memory-allocation optimizations
This commit is contained in:
MichaelEischer
2022-08-26 20:33:02 +02:00
committed by GitHub
3 changed files with 9 additions and 1 deletions

View File

@@ -294,6 +294,8 @@ func (idx *Index) EachByPack(ctx context.Context, packBlacklist restic.IDSet) <-
result.Blobs = append(result.Blobs, idx.toPackedBlob(e, restic.BlobType(typ)).Blob)
}
}
// allow GC once entry is no longer necessary
byPack[packID] = nil
select {
case <-ctx.Done():
return