reduce buffer pool size

This commit is contained in:
hebo
2019-12-06 16:09:36 +08:00
parent c83c5a1cc5
commit ee573a3bbc
3 changed files with 3 additions and 3 deletions

View File

@@ -15,7 +15,7 @@ type sliceBufferPool struct {
func NewSliceBufferPool(name string, bufferSize int) (sbp *sliceBufferPool) {
return &sliceBufferPool{
queue: make(chan []byte, 512),
queue: make(chan []byte, 256),
bufferSize: bufferSize,
name: name,
}

View File

@@ -34,7 +34,7 @@ const (
var (
mqpp = NewMysqlQueryPiecePool()
localSliceBufferPool = NewSliceBufferPool("json cache", 2*1024*1024)
localSliceBufferPool = NewSliceBufferPool("json cache", 1*1024*1024)
)
var commonBaseQueryPiece = &BaseQueryPiece{}