-
Notifications
You must be signed in to change notification settings - Fork 3k
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
Tab completion is incredibly slow and picky about formatting #9157
Comments
It can't repro on Windows. It may be Mac/Linux only issue. |
@jboulter11 , can you try other commands (not az) to see if it has the same issue. I think it may the OS issue not az command issue. |
Other commands provide an instant response. |
@tjprescott, @limingu, I would be interested in this post build. We should try and imitate powershell. Maddie once mentioned how they cache tab completions... |
add to S164. |
I second the observation provided here. I'm on a mac, first time using AZ CLI and first thing I noticed is wow, this command completion is super slow. Googled the issue hoping to find a resolution and this issue report is the first thing I came across. |
The slowness is due to the fact that auto-complete is achieved by calling We will try to improve the performance in the future. |
13/02/2021 still too slow |
This is still extremely slow on Linux.
|
The CLI autocompletion is still very slow. I just installed Ubuntu 20.04 LTE under WFL on a Surface book 3. The Windows OS is fully up to date. Is there any recommended configuration under Windows that is known to work properly? E.g. maybe trying with a different distribution or different installation procedure for the cli? |
With the introduction of Command Index (#13294), the execution and auto-complete speed of On my local machine's Ubuntu 20.04 running on WSL 2, when I type
Auto-complete currently doesn't work on Windows. Are you using WSL instead of "WFL"? In that case, could you try WSL 2 which greatly improves the performance of the Linux subsystem? |
Thank you very much Jiashuo. I have moved to WSL 2 and now the autocomplete is very fast. |
@faustinopalma, I am glad to know it works well for you. 😊 |
Still slow for me is take 1-2 second (WSL2) |
Tab completion still slow for me on MacOS 11.16.1. azure-cli 2.30.0 |
Absolutely appalling performance on MacOS. This is completely unacceptable. AWS CLI completion is nearly instantaneous and they have just as many commands, if not more, than you. Microsoft, please stop developing CLI tools with a Windows first attitude. |
On Linux still pretty slow (~2 seconds) Looks like atleast on Linux az also always makes a call to some Microsoft server whenever I invoke bash completion (Not only when it would provide a useful completion this way) |
slow as turtle. regular tasks are so anoying that sometimes I just prefere click-click way. |
same here. On Windows 11 + WSL2. |
Issue still persist in Win 10 + WSL2 |
I am surprised that even after more than 3 years the issue has not been resolved. Tab completion is so slow that it is not usable. MS please do something about it or remove the feature. Whats the use of a feature if it is not usable? Tried in both Windows and Linux same result, painfully s.....l......o......w |
I looked at this briefly and it seem to have to do with how The trouble is that Compare this with say Without completely rewriting the basics of how the tool is structured so that it could be compiled, this seems hard to fix. One possibility is a sort of caching mechanism (perhaps via a separate completer executable) that could potentially enumerate all of the basic tab completion command options (but not local variable/subscription/etc. options) once and only re-evaluate them upon extension or tool addition/upgrade. That would turn the several seconds stall into an infrequent event for tab completions, but would still suffer the couple of seconds to load all the libraries once you actually invoke the command. |
Azure-cli uses The completion time is nearly the same as @ash-dey which command are you using, could you please send me the output of it with |
@bebound - it's no where near that fast on Mac, see below. A second run of
|
@TomBailey-N Thanks for the info. What's the output of this command? Does the command run faster after running |
Still very slow, on the fastest macbook available today. Any update? |
@johnib Can you give me an example of the command when you press If the last word is not complete, it’s a lot slower than it should be. I’ve found a way to fix it. For example: |
are you serious? |
Not sure if it ran much faster or not.. it's still slow compared to other CLIs (aws for instance). Not having auto-completion on a CLI significantly reduces usage with it. Currently I'm using the Az powershell module instead (on a macOS...) just because it's faster in its auto-completion. Given you acknowledge the slowness, please let us know what are the plans (if at all) and timelines to fix this. Thank you! |
I hope the completion can be finished in 1 second. For now, the help command reaches the target. I think The reason why autocomplete is slower than Here is the result of WSL Ubuntu
Mac
Linux
|
There is a significant performance improvement in 2.49, please give it a try. |
Is this still the way to go for zsh? # az shell completion
autoload -U +X bashcompinit && bashcompinit
source /etc/bash_completion.d/azure-cli Because it is still too slow for me. # az version
{
"azure-cli": "2.51.0",
"azure-cli-core": "2.51.0",
"azure-cli-telemetry": "1.1.0",
"extensions": {}
} |
Yes |
Hmm, even just running
|
This is expected. |
Describe the bug
Tab completion is painfully slow. See repro.
Command Name
az
Errors:
To Reproduce:
az
in the terminalAnother example:
az devops
oraz boards
in the terminal-- no matches found --
output.Expected Behavior
A response should be given immediately with no delay and it should not be picky about whether there is a space after the last command.
The entire autocompletion process is way too slow. Type git and hit tab and you get an instant response with completions with nice formatting. This has got to be better in the azure cli. 1-2s is too long, but 5 seconds is just shameful especially having it return no results after, only to work after hitting space.
Please let me know if you need any more information to help prioritize this work, feel free to reach out to me via email or teams via my alias: jiboulte.
Environment Summary
Additional Context
The text was updated successfully, but these errors were encountered: