Increase read buffer size to 64KB
This commit is contained in:
parent
c4c92142a6
commit
3a9532c8fd
@ -15,7 +15,8 @@ const (
|
|||||||
coordinatorDelayStep time.Duration = 10 * time.Millisecond
|
coordinatorDelayStep time.Duration = 10 * time.Millisecond
|
||||||
|
|
||||||
// Reader
|
// Reader
|
||||||
defaultCommand = `find . -path '*/\.*' -prune -o -type f -print -o -type l -print 2> /dev/null | sed s/^..//`
|
defaultCommand = `find . -path '*/\.*' -prune -o -type f -print -o -type l -print 2> /dev/null | sed s/^..//`
|
||||||
|
readerBufferSize = 64 * 1024
|
||||||
|
|
||||||
// Terminal
|
// Terminal
|
||||||
initialDelay = 20 * time.Millisecond
|
initialDelay = 20 * time.Millisecond
|
||||||
|
@ -34,7 +34,7 @@ func (r *Reader) feed(src io.Reader) {
|
|||||||
if r.delimNil {
|
if r.delimNil {
|
||||||
delim = '\000'
|
delim = '\000'
|
||||||
}
|
}
|
||||||
reader := bufio.NewReader(src)
|
reader := bufio.NewReaderSize(src, readerBufferSize)
|
||||||
for {
|
for {
|
||||||
// ReadBytes returns err != nil if and only if the returned data does not
|
// ReadBytes returns err != nil if and only if the returned data does not
|
||||||
// end in delim.
|
// end in delim.
|
||||||
|
Loading…
Reference in New Issue
Block a user