Reduce parallelReader allocs (#19558)

This commit is contained in:
Klaus Post
2024-04-19 09:44:59 -07:00
committed by GitHub
parent 5f774951b1
commit ec816f3840
6 changed files with 61 additions and 19 deletions

View File

@@ -103,8 +103,9 @@ func newErasureServerPools(ctx context.Context, endpointServerPools EndpointServ
// Initialize byte pool once for all sets, bpool size is set to
// setCount * setDriveCount with each memory upto blockSizeV2.
globalBytePoolCap = bpool.NewBytePoolCap(n, blockSizeV2, blockSizeV2*2)
globalBytePoolCap.Populate()
buffers := bpool.NewBytePoolCap(n, blockSizeV2, blockSizeV2*2)
buffers.Populate()
globalBytePoolCap.Store(buffers)
var localDrives []StorageAPI
local := endpointServerPools.FirstLocal()