Skip to content
This repository has been archived by the owner on Sep 11, 2020. It is now read-only.

Commit

Permalink
Improve performace for reading many small objects from packfile by le…
Browse files Browse the repository at this point in the history
…tting the I/O buffers be used better.

Signed-off-by: Filip Navara <navara@emclient.com>
  • Loading branch information
filipnavara committed Sep 24, 2018
1 parent beb994d commit d5bd4e3
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion plumbing/format/packfile/packfile.go
Original file line number Diff line number Diff line change
Expand Up @@ -208,7 +208,7 @@ func (p *Packfile) objectAtOffset(offset int64) (plumbing.EncodedObject, error)

// If we have no filesystem, we will return a MemoryObject instead
// of an FSObject.
if p.fs == nil {
if p.fs == nil || h.Length <= 16 * 1024 {
return p.getNextObject(h)
}

Expand Down

0 comments on commit d5bd4e3

Please sign in to comment.