mirror of
https://github.com/octoleo/restic.git
synced 2024-12-22 19:08:55 +00:00
Merge pull request #4301 from MichaelEischer/less-restore-memory
restore: slightly reduce memory usage while restoring files
This commit is contained in:
commit
6dc2324d2e
@ -181,6 +181,8 @@ func (r *fileRestorer) restoreFiles(ctx context.Context) error {
|
|||||||
wg.Go(func() error {
|
wg.Go(func() error {
|
||||||
for _, id := range packOrder {
|
for _, id := range packOrder {
|
||||||
pack := packs[id]
|
pack := packs[id]
|
||||||
|
// allow garbage collection of packInfo
|
||||||
|
delete(packs, id)
|
||||||
select {
|
select {
|
||||||
case <-ctx.Done():
|
case <-ctx.Done():
|
||||||
return ctx.Err()
|
return ctx.Err()
|
||||||
|
Loading…
Reference in New Issue
Block a user