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

Commit d5bd4e3

Browse files
committed
Improve performace for reading many small objects from packfile by letting the I/O buffers be used better.
Signed-off-by: Filip Navara <[email protected]>
1 parent beb994d commit d5bd4e3

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

plumbing/format/packfile/packfile.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -208,7 +208,7 @@ func (p *Packfile) objectAtOffset(offset int64) (plumbing.EncodedObject, error)
208208

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

0 commit comments

Comments
 (0)