mirror of
https://github.com/go-gitea/gitea
synced 2025-07-20 01:08:35 +00:00
v1.1.0 has improved buffer pooling
This commit is contained in:
8
vendor/github.com/unrolled/render/buffer.go
generated
vendored
8
vendor/github.com/unrolled/render/buffer.go
generated
vendored
@@ -2,9 +2,6 @@ package render
|
||||
|
||||
import "bytes"
|
||||
|
||||
// bufPool represents a reusable buffer pool for executing templates into.
|
||||
var bufPool *BufferPool
|
||||
|
||||
// BufferPool implements a pool of bytes.Buffers in the form of a bounded channel.
|
||||
// Pulled from the github.com/oxtoacart/bpool package (Apache licensed).
|
||||
type BufferPool struct {
|
||||
@@ -39,8 +36,3 @@ func (bp *BufferPool) Put(b *bytes.Buffer) {
|
||||
default: // Discard the buffer if the pool is full.
|
||||
}
|
||||
}
|
||||
|
||||
// Initialize buffer pool for writing templates into.
|
||||
func init() {
|
||||
bufPool = NewBufferPool(64)
|
||||
}
|
||||
|
Reference in New Issue
Block a user