1
0
Fork 0
mirror of https://github.com/restic/restic.git synced 2025-03-16 00:00:05 +01:00

Reuse lazyBlobs, 60x speed improvement

This commit is contained in:
Matthieu Rakotojaona 2015-07-21 22:53:01 +02:00
parent 4f28b2e649
commit 70cece79aa

View file

@ -56,7 +56,7 @@ func newBlob(repo *repository.Repository, id backend.ID) (*lazyBlob, error) {
}, nil
}
func (lb lazyBlob) ReadAt(p []byte, off int64) (n int, err error) {
func (lb *lazyBlob) ReadAt(p []byte, off int64) (n int, err error) {
if len(lb.content) == 0 {
lb.content, err = lb.repo.LoadBlob(pack.Data, lb.id)
if err != nil {