mirror of https://github.com/minio/minio.git
Alloc less for metacache decompression (#12134)
Network streams are limited to 16K blocks. Don't alloc more upfront. Signed-off-by: Klaus Post <klauspost@gmail.com>
This commit is contained in:
parent
bb1198c2c6
commit
e0d3a8c1f4
|
@ -230,7 +230,8 @@ func (w *metacacheWriter) Reset(out io.Writer) {
|
|||
}
|
||||
|
||||
var s2DecPool = sync.Pool{New: func() interface{} {
|
||||
return s2.NewReader(nil)
|
||||
// Default alloc block for network transfer.
|
||||
return s2.NewReader(nil, s2.ReaderAllocBlock(16<<10))
|
||||
}}
|
||||
|
||||
// metacacheReader allows reading a cache stream.
|
||||
|
|
Loading…
Reference in New Issue