Skip to content
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

neovim will block/freeze when retrieving lots of candidates #55

Closed
FelipeLema opened this issue Oct 18, 2022 · 2 comments
Closed

neovim will block/freeze when retrieving lots of candidates #55

FelipeLema opened this issue Oct 18, 2022 · 2 comments

Comments

@FelipeLema
Copy link

hey, everyone

this is about the only problem I've encountered with this plugin. I take my hat off and congratulate the maintainers on some real robust code you have here.

So I have a single directory with about 1500 files and the whole neovim will freeze and not accept any inputs until all candidates have been fetched. It takes a few seconds to regain control of neovim.

My advice is replacing the while true block that does fs_scandir_next() and instead execute it in a separate thread using something like luv's thread pool work scheduling, probable with some sort of short-circuiting feature.

I can do a PR for this if the maintainers accept that this is within the scope of this package/plugin

@FelipeLema
Copy link
Author

I forked this repo to fix this issue, see https://github.com/FelipeLema/cmp-async-path

@zefr0x
Copy link

zefr0x commented Jan 4, 2024

@FelipeLema please open a PR so @hrsh7th can merge if it LGTH.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants