Skip to content

Commit

Permalink
Improve buffer reuse
Browse files Browse the repository at this point in the history
  • Loading branch information
lxzan committed Jul 29, 2023
1 parent e1df51f commit f28f0dc
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion internal/pool.go
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ func (p *BufferPool) Put(b *bytes.Buffer, index int) {
if index == 0 || b == nil {
return
}
if b.Cap() <= 2*p.limits[index] {
if b.Cap() <= 3*p.limits[index] {
p.pools[index].Put(b)
}
}
Expand Down

0 comments on commit f28f0dc

Please sign in to comment.