summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorJunegunn Choi <junegunn.c@gmail.com>2016-08-16 01:52:24 +0900
committerJunegunn Choi <junegunn.c@gmail.com>2016-08-16 02:06:15 +0900
commit3a9532c8fd9e38315566752db2f04049059f9ba8 (patch)
tree7f164df3a425164778b1a6e55db8592afc48d91c /src
parentc4c92142a6001936420096d9f8e335cb25e116aa (diff)
downloadfzf-3a9532c8fd9e38315566752db2f04049059f9ba8.tar.gz
Increase read buffer size to 64KB
Diffstat (limited to 'src')
-rw-r--r--src/constants.go3
-rw-r--r--src/reader.go2
2 files changed, 3 insertions, 2 deletions
diff --git a/src/constants.go b/src/constants.go
index e87e3938..74c59fa6 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 85cbf8be..05426660 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.