Closed vegerot closed 9 months ago
Indeed it is. This might be a bit outdated but here's a comparison between fzf.vim and telescope outlining the reasons/compromises. https://github.com/nvim-telescope/telescope.nvim/issues/719#issuecomment-812879771
If you're frequently working on large codebases and/or have limited hardware, Telescope's find_files may not be for you.
fzf.vim or fzf-lua are still great tools especially if performance is a concern.
We hope to improve on this more but I don't think it's likely that we'll ever fully catch up to these alternatives in terms of performance.
Hey,
Telescope is very pretty, and seems useful, but in case anyone else runs into Telescope being slower than you'd expect. It seems like disabling the preview is the quickest gain.
For context, I'm using CtrlP (with PyMatcher and fd as the user command (let g:ctrlp_user_command = 'fd --type f --color=never --exclude "**/*.jar" --exclude "**/*.png" . %s'
)), and it's also much faster than find_files even on a 633 file project (according to fd | wc -l
), and just as bad on a 11k file project.
Since Telescope uses Nvim's builtin LSP, it can't talk to coc.nvim either, so the telescope.lsp_*/diagnostics
things can't work either.
Is there maybe a common list of other settings to tweak to improve performance? It seems like disabling the file preview has the largest impact because of my slow LSPs,
:lua require('telescope.builtin').find_files({previewer=false})
" or
:Telescope find_files previewer=false
Most of my files have the 'previewer timed out' error, so I guess it's not a telescope specific issue after all, but it's a shame.
Hope this helps anyone else trying to get instant search results; disabling preview is the way to go.
@tankorsmash jooc after making these changes, is find_files
even within an order of magnitude of fzf.vim for performance?
Oh, I thought "jooc" was a mis-ping, instead of maybe 'just out of curiosity'! I don't use fzf.vim, but without previewing, it's about comparable to CtrlP without custom matchers. Hadn't tried since the comment a few weeks ago.
I'm back to CtrlP with instant results though!
Description
In huge directories, Telescope's
find_files
is much slower than fzf.vim's:Files
.I have reproduced this on Telescope's
master
and0.1.5
. With and withoutfzy
, and with and without previews enabled for both:Files
and:Telescope find_files
.Neovim version
Operating system and version
macOS 14.2.1
Telescope version / branch / rev
reproduced on both d909568 (0.1.5) and 20efb3 (master)
checkhealth telescope
Steps to reproduce
export FZF_DEFAULT_COMMAND=fd
chromium/third_party/blink
):Telescope find_files
and search for a file:Files
and search for a fileExpected behavior
:Telescope find_files
should take about as long as:Files
Actual behavior
:Telescope find_files
takes about 10x longer than:Files
Minimal config