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.
  • Loading branch information
filipnavara committed Sep 23, 2018
1 parent c15715d commit cb4fbe0
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 cb4fbe0

Please sign in to comment.