-
Notifications
You must be signed in to change notification settings - Fork 86
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Performance is dramatically bad comparing to fzf.vim #343
Comments
Since you have merely 2k items, which is a small dataset, all fuzzy finder should be fast in this case, even ctrlp.vim, let alone clap is expected to handle 1M items with Rust extension easily, see #1 (comment). I can't see the problem from the video, try using I'm unsure if it's related to the rust binary is not latest. Since you already installed cargo, you can try building the Rust binary yourself instead of using the prebuilt binary. Try running The advantage of fzf.vim(or fzf) is the dynamic refresh, letting you feel more responsive. The good of clap is the ability to give the final determistic results much faster. You can try that, searching somthing in 1M items, clap will finish the job much faster than fzf.vim especially when the search string is very short, while fzf.vim is still freshing. The bad thing is the dynamic refresh is still missing in clap, see If you do care about the performence(2k items is not deserved to talk about the perf), I would suggest you just using fzf.vim as I have to admit that fzf is more polished than clap's Rust binary, and fzf.vim now supports both floating_win of neovim and popup of vim too. |
I would like to add there is a visible lag in opening Clap compared to fzf. Is it possible to minimize this lag? |
Not sure how big is your dataset, you can find what is slowing you down using the profile, see What's more, as I have said, the dynamic refreshing is missing at the moment, you have to wait for #353 and #364 for this feature. If you are using vim, you can try decreasing |
The dataset is quite small, I am just using Also I'm using nvim. I'm attaching the profile below. My main problem is that there is slight lag when opening Clap, but the same is not present when fzf is opened. Profile
|
Oh, this is weird. I disabled vim-airline and now the lag only exists the first time I open Clap. Every subsequent opening is fast. Looks like airline is somehow slowing Clap down. I don't have enough expertise to track it down though. I hope you can help. |
From your profile report, I don't see the slowness, see the final And here is the result on my computer, vim-clap is a little faster in iterms of the opening. Call total:
For fzf, call total:
|
I don't use vim-airline, so can't help more :(. @vn-ki You might want to file an issue at vim-airline to see if they have some suggestions. |
Once #383 is merged, the cache and dynamic freshing feature are both added for grepping and searching files, which can make clap much faster than before, especially the cache feature, you can run Feel free to try #383, and please provide the profile report if you still see the slowness problem. @alex-popov-tech |
@liuchengxu thanks, waiting for it! |
Can this be reopened. I am on the neovim master and arch, and ran make, but Clap feels slow to open. |
@Avi-D-coder Post your profile report with minimal vimrc. |
Environment (please complete the following information):
Describe the bug
I know that comparing this plugin to fzf.vim is not very relevant, but just to be more descriprive what would i expect from this plugin :) The problem is - when i typing some text in Clap fzf it loads very slowly and i can see several chars appear at the same time...long story short - here is the video https://share.getcloudapp.com/P8uRk8lB
Clap debug
To Reproduce
Steps to reproduce the behavior:
Clap files
orClap gfiles
Note - it seems like lags disappear after some quantity of chars
Expected behavior
Text should appear in search bar smoothly
Actual behavior
While typing text is lagging
Additional context
Video - https://share.getcloudapp.com/BluBYnLB
The text was updated successfully, but these errors were encountered: