-
-
Notifications
You must be signed in to change notification settings - Fork 9.4k
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
Completion for brew
commands in Zsh is really slow
#7749
Comments
brew
in Zsh is really slowbrew
commands in Zsh is really slow
As with all "this is slow" issues: we do not consider this a bug but will accept a pull request to improve the speed. |
@MikeMcQuaid If you don't leave these sorts of issues open, it's very difficult for someone looking to contribute to figure out what needs work. |
I opened a similar issue in the past and debugged the slow line. See #6106 for anyone who visits this in the future and wants to fix it. |
You can see the slowness with: ~code-server:master*
$ /usr/bin/time brew commands --quiet --include-aliases > /dev/null
0.78 real 0.43 user 0.32 sys |
I think it's just due to ruby being slow to startup. e.g. catting a formula takes a similar amount of time: ~code-server:master*
$ /usr/bin/time brew cat code-server > /dev/null
0.84 real 0.45 user 0.35 sys |
@MikeMcQuaid What're your thoughts on changing the completion scripts to instead hard code the list of commands? |
An update from my part on this: I tested a bit more and found that if I do
Also, the caching strategy could be a bit more sophisticated than it is now. At present, the caching policy looks only at the date of Could |
Ah looks like it was added at #5388 |
- Cache completions Homebrew/brew#7749 - Disable only bold colors in brew output
@MikeMcQuaid Can you unlock #6106 so that I can add a comment there explaining what the problem was and why I was the only one who seemed to experience it in case someone stumbles upon it? |
Yet you seemed to find it despite it being closed. Our way of managing our issue trackers works for us: run your own projects however you wish. Some general feedback @nhooyr: I'm not sure it's helpful for you to continue to create issues rather than PRs and your feedback on how we should run our project is definitely not helpful.
If they are generated by something like e.g.
This may be possible but I'm not sure how it'd be done. We'd review a PR. This could perhaps be done more generically by e.g. writing
No, sorry. |
I will submit one soon. |
@MikeMcQuaid @nhooyr Here you go: #7766 |
- Cache completions Homebrew/brew#7749 - Disable only bold colors in brew output
brew update
and can still reproduce the problem?brew doctor
, fixed all issues and can still reproduce the problem?brew config
andbrew doctor
and included their output with your issue?What you were trying to do (and why)
brew ins
tab⇥What happened (include command output)
There's a significant delay before this gets completed to
brew install
. Other completions forbrew
in Zsh suffer from similar or even worse delays.What you expected to happen
I expect it to be near instantaneous, as it is for all other completions in Zsh.
Step-by-step reproduction instructions (by running
brew
commands)and press tab⇥.
Output of
brew config
andbrew doctor
commandsThe text was updated successfully, but these errors were encountered: