diff options
author | Alberto Cortés <alberto@sourced.tech> | 2016-01-26 02:26:38 +0100 |
---|---|---|
committer | Alberto Cortés <alberto@sourced.tech> | 2016-01-26 02:26:38 +0100 |
commit | 3db12e2e2f550ade9670efbe2ad72608845bb88e (patch) | |
tree | a53c5a95f3eb35958e3aeff7f778cdaf6a414088 /formats/packfile/reader.go | |
parent | 050fb78d77b30014acd0b6eefc88ec8a49c20371 (diff) | |
download | go-git-3db12e2e2f550ade9670efbe2ad72608845bb88e.tar.gz |
Speed up packfile reading
By adding a bufio to the trackingReader, otherwise most of the time
is spent in syscalls for small reads to the packfile.
Diffstat (limited to 'formats/packfile/reader.go')
-rw-r--r-- | formats/packfile/reader.go | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/formats/packfile/reader.go b/formats/packfile/reader.go index 3ff342f..37918b1 100644 --- a/formats/packfile/reader.go +++ b/formats/packfile/reader.go @@ -59,7 +59,7 @@ func NewReader(r io.Reader) *Reader { return &Reader{ MaxObjectsLimit: DefaultMaxObjectsLimit, - r: &trackingReader{r: r}, + r: NewTrackingReader(r), offsets: make(map[int64]core.Hash, 0), } } |