Closed heycam closed 6 years ago
fzf is rarely ever the bottleneck in my usage. Consider using a different program to list files, for example export FZF_DEFAULT_COMMAND
with your choice of ag
rg
or similar.
Compared to other filter related programs, eg selecta
or fzy
, fzf
is the only I've found that doesn't buffer stdin and makes the UI visible and usable while the input program is still running. If you have ideas on how to improve "throughput" from stdin to the UI I would love to read your pull request.
Thanks for the hint, Daniel! It looks like the default command when FZF_DEFAULT_COMMAND
is not set,
find -L . -mindepth 1 \( -path '*/\.*' -o -fstype 'sysfs' -o -fstype 'devfs' -o -fstype 'devtmpfs' -o -fstype 'proc' \) -prune -o -type f -print -o -type l -print 2> /dev/null | cut -b3-
is just super slow. When I do use find . -type f
, I get much more reasonable times:
cam@zoo /z/moz/central $ time FZF_DEFAULT_COMMAND='find . -type f' /z/fzf/bin/fzf -f properties.mako.rs | head -1
./servo/components/style/properties/properties.mako.rs
real 0m0.407s
user 0m0.360s
sys 0m0.320s
i know it's old, but anyway a hint, i use --walker-skip=Library,.git,node_modules
This shouldn't be closed? I'd expect this tool to be fast due to its indexing but it isn't.
I'd expect this tool to be fast due to its indexing but it isn't.
fzf is not a file finder, it is an interactive filter for stdin, that just so happens to list files as a default behavior when not given stdin
afaik it does not index your file system, and on windows you are likely to experience some fairly noticeable performance issues due to windows antivirus hooks in the filesystem
I'm working in a project directory that has almost 300,000 files under it. I'd like to use fzf to avoid typing out long path names but it's too slow on my machine:
Is there anything I can do to make fzf fast enough for interactive use?