diff --git a/src/constants.go b/src/constants.go index e87e393..74c59fa 100644 --- a/src/constants.go +++ b/src/constants.go @@ -15,7 +15,8 @@ const ( coordinatorDelayStep time.Duration = 10 * time.Millisecond // 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 initialDelay = 20 * time.Millisecond diff --git a/src/reader.go b/src/reader.go index 85cbf8b..0542666 100644 --- a/src/reader.go +++ b/src/reader.go @@ -34,7 +34,7 @@ func (r *Reader) feed(src io.Reader) { if r.delimNil { delim = '\000' } - reader := bufio.NewReader(src) + reader := bufio.NewReaderSize(src, readerBufferSize) for { // ReadBytes returns err != nil if and only if the returned data does not // end in delim.