-
-
Notifications
You must be signed in to change notification settings - Fork 8.2k
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
windows git bash: Listing aliases is very slow #3054
Comments
What version of WSL are you using? |
I don't use WSL, actually, I'm using Git Bash for Windows. According to their |
ah, gotcha. There's not been extensive usage in git bash, so performance issues aren't surprising. If there's changes that we can make that maintain correctness while improving performance, I'm always happy to review a PR :-) |
I'm investigating this a bit more to see if performance can be improved without changing output order. Even a single invocation of
and I have 12 aliases set up, so this function could account for the vast majority of the sys time. Edit: the majority of that is a single Edit 2: continuing down the chain,
|
I have a potential improvement: it speeds up
I know that cross-env was designed to prevent this, but I don't want to add a new dependency. Regardless, my |
If you push up a branch to your fork, github actions should run the tests for you. |
Operating system and version:
Windows 10
nvm debug
output:nvm ls
output:How did you install
nvm
?I don't remember for certain. I either used the curl script in the README, or cloned the git repo directly.
What steps did you perform?
Simply run
nvm ls
ornvm alias
with no arguments.What happened?
It takes 20-30 seconds to complete (though of course
nvm alias
is faster thannvm ls
):Most of this time is spent in
nvm_list_aliases
:What did you expect to happen?
The output should display in a reasonable amount of time; cf.
nvm ls --no-alias
:I noticed that a slight modification to
nvm_list_aliases
(only callingwait
andsort
once each) sped it up significantly:Of course, the order of the output is slightly different, but I don't mind that.
The code for
nvm_list_aliases_onesort_onewait
Is there anything in any of your profile files that modifies the
PATH
?Yes. I have the following excerpt in my .bash_profile:
While the times given above are with this excerpt,
nvm ls
was slow before I added it.The text was updated successfully, but these errors were encountered: