Preallocate pack entries list
This commit is contained in:
parent
caabc4ec44
commit
cd9b526203
1 changed files with 2 additions and 0 deletions
|
@ -233,6 +233,8 @@ func List(k *crypto.Key, rd io.ReaderAt, size int64) (entries []restic.Blob, err
|
|||
|
||||
hdrRd := bytes.NewReader(buf)
|
||||
|
||||
entries = make([]restic.Blob, 0, uint(n)/entrySize)
|
||||
|
||||
pos := uint(0)
|
||||
for {
|
||||
e := headerEntry{}
|
||||
|
|
Loading…
Reference in a new issue