volume: add "readBufSize" option to customize read optimization (#3702)
* simplify a bit * feat: volume: add "readBufSize" option to customize read optimization * refactor : redbufSIze -> readBufferSize * simplify a bit * simplify a bit
This commit is contained in:
@@ -136,7 +136,7 @@ func (v *Volume) readNeedleDataInto(n *needle.Needle, readOption *ReadOption, wr
|
||||
actualOffset += int64(MaxPossibleVolumeSize)
|
||||
}
|
||||
|
||||
buf := mem.Allocate(min(1024*1024, int(size)))
|
||||
buf := mem.Allocate(min(readOption.ReadBufferSize, int(size)))
|
||||
defer mem.Free(buf)
|
||||
|
||||
// read needle data
|
||||
|
||||
Reference in New Issue
Block a user