-
-
Notifications
You must be signed in to change notification settings - Fork 339
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-git-grep slow to respond #524
Comments
I'm pretty sure this is the initial start-up cost of the Just checked this for a clone of scipy that I haven't touched in a long while. First shell call to
And of course |
I'm getting the same nearly 0 time for git grep itself called in shell, but even on repeated calls counsel-git-grep is slow to start up. |
Try evaluating this code in different repositories:
It's called once in each |
Even in my .emacs.d it's 1.931969s. Other random repos, non large, are ~1.5 and 2 seconds. |
I see. So it's a big issue on slower computers. Perhaps some caching can be introduced. Or a faster way of determining the repository size. Suggestions? |
No real suggestions yet, some more info: It's not really a slow computer, it's mid 2014 2.2Ghz i7.
Git 2.8.3 |
Here's the command used to calculate the number of lines in a repository:
See if you can optimize it for your system. |
It seems like something else is causing the slowdown, because that command runs pretty much instantaneously in the terminal for me (0.05s). |
Now that I've had some sleep I realise it's obviously because of the startup time of the shell itself. shell-file-name had been set to fish, and fish is much slower to start than bash is. |
lol |
I have a somewhat big repo and somewhat limited IO bandwidth, as a result @abo-abo, would you be willing to accept a PR which adds an option to skip calling |
@edkolev sounds good, thanks in advance. |
It takes ~3 seconds for the prompt to appear after calling it in a small repo. counsel-git is also slow to appear, though a little better. After the prompt appears the typing and narrowing is instantaneous, so something about just the initialisation is slow. counsel-ag is the opposite, the prompt appears immediately but narrowing results is slow.
How can I help track down what causes this delay?
The text was updated successfully, but these errors were encountered: