1
0
mirror of https://github.com/restic/restic.git synced 2024-06-23 07:36:38 +02:00

Preallocate pack entries list

This commit is contained in:
Alexander Neumann 2017-01-15 15:27:58 +01:00
parent caabc4ec44
commit cd9b526203

View File

@ -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{}