Performance fix - unnecessary rune convertion on --ansi

> time cat /tmp/list | fzf-0.10.1-darwin_amd64 --ansi -fqwerty > /dev/null

    real    0m4.364s
    user    0m8.231s
    sys     0m0.820s

    > time cat /tmp/list | fzf --ansi -fqwerty > /dev/null

    real    0m4.624s
    user    0m5.755s
    sys     0m0.732s
This commit is contained in:
Junegunn Choi
2015-08-02 14:25:57 +09:00
parent 0ea66329b8
commit e13bafc1ab
6 changed files with 52 additions and 42 deletions

View File

@@ -10,7 +10,7 @@ func TestReadFromCommand(t *testing.T) {
strs := []string{}
eb := util.NewEventBox()
reader := Reader{
pusher: func(s []rune) bool { strs = append(strs, string(s)); return true },
pusher: func(s []byte) bool { strs = append(strs, string(s)); return true },
eventBox: eb}
// Check EventBox