diff options
author | Máximo Cuadros <mcuadros@gmail.com> | 2019-04-22 20:37:50 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-04-22 20:37:50 +0200 |
commit | 7b3220f1790e35ed1596540363599099c2821b9f (patch) | |
tree | e2881d61cb341218395e75e35344cb5835df98aa /storage | |
parent | 6d4408addbaec52b861012688df0f09b79362e42 (diff) | |
parent | 262179b985108f0cbabc046b315e4feb3311a199 (diff) | |
download | go-git-7b3220f1790e35ed1596540363599099c2821b9f.tar.gz |
Merge pull request #1126 from saracen/index-performance-improvements
plumbing: format/index perf, buffered reads, reflection removal
Diffstat (limited to 'storage')
-rw-r--r-- | storage/filesystem/index.go | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/storage/filesystem/index.go b/storage/filesystem/index.go index 2ebf57e..d04195c 100644 --- a/storage/filesystem/index.go +++ b/storage/filesystem/index.go @@ -1,6 +1,7 @@ package filesystem import ( + "bufio" "os" "gopkg.in/src-d/go-git.v4/plumbing/format/index" @@ -41,7 +42,7 @@ func (s *IndexStorage) Index() (i *index.Index, err error) { defer ioutil.CheckClose(f, &err) - d := index.NewDecoder(f) + d := index.NewDecoder(bufio.NewReader(f)) err = d.Decode(idx) return idx, err } |