-
Notifications
You must be signed in to change notification settings - Fork 39
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
counsel-projectile-find-file extremely sluggish in larger repositories. #179
Comments
The immediate problem appears to be counsel-projectile/counsel-projectile.el Line 1632 in 06b03c1
This collection function is called each time a new character is added to the input (but not when characters are removed, I guess ivy-read simply caches the filtered results). In a non-trivial repository this can incur several hundred milliseconds on a single character stroke, so if one rapidly types in |
I am experiencing the same issue. I use |
Hi, thanks for reporting. I guess you are right that the issues comes from the use of a collection function. I didn't notice it because I don't use large repositories. It is probably worth trying to change this, but unfortunately it will probably take a while until I can look at it, sorry about that (PRs welcome of course). |
Hello, |
Hi, I also see this issue on macOS. If I watch active processes on my machine whilst running As a workaround I found that if I enable caching of project files in Projectile (with |
Great tip, thanks for sharing! I recommend reading the docs on caching to understand how/when you would need to manually purge the cache. Another thing I noticed that it was still sluggish when switching between projects with |
When switching the project to https://github.com/NixOS/nixpkgs (~25,000 files), or calling
M-x counsel-projectile-find-file
inside the same repository, typing a few letters (say "postfix") causes emacs/ivy to hang for a few seconds on my laptop until the ivy minibuffer refreshes and displays the filtered strings. In comparison,projectile-find-file
is much more snappy, which seems to respond within a hundred milliseconds or so.I also tried to set
counsel-projectile-find-file-more-chars
to2
to no avail.My counsel/ivy/projectile config is completely left at default.
Here's the output of CPU and memory profilers:
CPU profiler
Memory profiler
The text was updated successfully, but these errors were encountered: