logoalt Hacker News

abejfehrtoday at 3:16 PM4 repliesview on HN

I'm surprised people are still using nvm, considering it's impact on shell startup time.

I can't recommend switching to mise highly enough: https://mise.en.dev/


Replies

blfrtoday at 5:58 PM

How often do you launch a fresh terminal though? I start mine with a script to have favourite tabs ready at boot and then generally not much afterwards.

show 3 replies
shhsshstoday at 3:46 PM

I use aliases that lazily load nvm when I actually want to use it. This converts the shell startup penalty into a node/npm startup penalty.

show 1 reply
vstmtoday at 3:39 PM

I wasn't actually aware of the impact. I measured the zsh startup time locally (with mvn active and commented out) and it indeed makes a difference (.39s -> .08s). Not that I would have noticed that without measuring :) - yes I'm an old geezer.

Thank you for the recommendation, I might then also be able to ditch sdkman as well.

show 1 reply