-
-
Notifications
You must be signed in to change notification settings - Fork 8.3k
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Startup performance regression #966
Comments
Thanks - it's known, and somewhat intentional - it's more important to ensure that people aren't using the "prefix" npm config than it is to ensure there's no performance issues. I don't know of a more reliable way to evaluate |
Could we make it possible to set an env var, such as |
@wadey My concern is then that people will just set that env var while using a prefix (and that random blogs and tutorials will recommend the same) - which isn't acceptable. If someone wants to use a prefix, I don't want them using However, it's very unfortunate that everyone has to suffer the |
Any decision on this ever come about? An ENV var at least gives those of us that care enough a way to work around it. cc @ljharb |
I help maintain several popular open-source projects, so I feel your pain of the deluge of support tickets due to misconfiguration/not reading the README.
Another way to look at it is that some folks who live in their terminals simply won't use I'd really like an ENV var called What about adding an issue template (now that Github supports them) that says:
Sane defaults makes sense, but locking it down so it's not performant just to prevent someone shooting themselves in the foot is like creating a "No child left behind" program that effectively is a "No child allowed ahead" program. I'm happy to help pitch in here, and perhaps there's a way to make For now, I've resorted to |
@jeffwidman instead of removing the default alias, you can do |
I also found that my shell startup slowed down after installing nvm. Without nvm, my .bash_profile takes 800ms to source. With nvm, it takes ~2600ms. A nearly two second delay for every shell startup really starts to hurt. I just curled down the latest nvm, 0.31.4, and the issue remains. Here is my
Any plans to offer a solution? |
@keithws at the moment, the solution is directly above your comment: #966 (comment) |
Unfortunately, that solution then breaks node everywhere else until I specify Since my startup time seems to be much longer than @joliss, 2600ms vs 340ms, could it be another issue? Note, |
@keithws sure, but I've tried profiling things before and there's nothing that can easily be sped up or removed - just a number of 2-300ms things that add up. You could try #966 (comment) and then follow it up with |
A performance regression seems to have been introduced in 1458de7, raising startup time (
time . ~/.nvm/nvm.sh
) from 65ms to 340ms on my system.I don't have time to dig into the cause right now, but just wanted to report this. :)
P.S. Here's the bash command I used to narrow down on the commit.
The text was updated successfully, but these errors were encountered: