diff options
author | Máximo Cuadros <mcuadros@gmail.com> | 2019-04-22 16:44:33 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-04-22 16:44:33 +0200 |
commit | 6d4408addbaec52b861012688df0f09b79362e42 (patch) | |
tree | 239d82105d8f8cffe0ccd727311482ffeab0371c /plumbing/object/common.go | |
parent | 78092a2843dc534d6f5ee2048f608d84c407bf46 (diff) | |
parent | 936f65dc143f091d5bdb3ee43cf11b06f6635cab (diff) | |
download | go-git-6d4408addbaec52b861012688df0f09b79362e42.tar.gz |
Merge pull request #1125 from saracen/tree-walk-optimization
plumbing: TreeWalker performance improvement, bufio pool for objects
Diffstat (limited to 'plumbing/object/common.go')
-rw-r--r-- | plumbing/object/common.go | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/plumbing/object/common.go b/plumbing/object/common.go new file mode 100644 index 0000000..3591f5f --- /dev/null +++ b/plumbing/object/common.go @@ -0,0 +1,12 @@ +package object + +import ( + "bufio" + "sync" +) + +var bufPool = sync.Pool{ + New: func() interface{} { + return bufio.NewReader(nil) + }, +} |