mirror of
https://github.com/octoleo/restic.git
synced 2024-11-11 15:51:02 +00:00
Preallocate pack entries list
This commit is contained in:
parent
caabc4ec44
commit
cd9b526203
@ -233,6 +233,8 @@ func List(k *crypto.Key, rd io.ReaderAt, size int64) (entries []restic.Blob, err
|
|||||||
|
|
||||||
hdrRd := bytes.NewReader(buf)
|
hdrRd := bytes.NewReader(buf)
|
||||||
|
|
||||||
|
entries = make([]restic.Blob, 0, uint(n)/entrySize)
|
||||||
|
|
||||||
pos := uint(0)
|
pos := uint(0)
|
||||||
for {
|
for {
|
||||||
e := headerEntry{}
|
e := headerEntry{}
|
||||||
|
Loading…
Reference in New Issue
Block a user