12 ms·
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
by abejfehr 3mo ago
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/ https://mise.en.dev/
- vstm 3mo agoI 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.
- VorpalWay 3mo agoWith zsh i set up nvm to lazy load, so I don't pay for it when I don't use it (I'm a C++ and Rust dev, but I occasionally need to run js stuff from other team members). I can strongly recommend lazy loading in zsh in general, I use it for pyenv too (which is also slow to load, but I write Python maybe every other week or so only). The way to do this is to use the autoload functionality in zsh and have the autoloaded script replace itself with the real shell init code for the tool in question.
- shhsshs 3mo agoI 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.
- abejfehr 3mo agoThis wasn't an option for us because as an org we used their recommended hook (1) to automatically change node versions when switching directories, but it effectively undoes the lazy loading. With mise you get the behaviour of automatically switching when you change directories effectively for free. 1. https://github.com/nvm-sh/nvm#zsh https://github.com/nvm-sh/nvm#zsh Edit: unless you aliased it to `node` or `npm`, which would be fine I guess but super annoying if you ran node or npm commands often. It is not worth the hassle, no one should use nvm in 2026 imo
- deleted 3mo ago[deleted]
- blfr 3mo agoHow 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.
- skydhash 3mo agoFor every query and commands. I don’t use a DE, so pretty much everything is cli based. I use xterm and it’s bound to mod4+Return for me.
- hombre_fatal 3mo agoConstantly. I think we've used the excuse of "well, what if you just launch it less often?" enough to excuse bad performance defaults, especially when alternative solutions fix the issue with very few trade-offs.
- frollogaston 3mo agoMaybe once a minute, though it's bursty so more like 4 times every 4 minutes, but I still didn't notice the nvm slowdown
- brewtide 3mo agoI set the framework key in function row to pop a new terminal. It's amazing.
- everforward 3mo agoThis is going to vary wildly by what you do and how much CLI you use. I’m an SRE and the answer is “constantly”. I get pulled in a lot of directions, it’s way easier to maintain context if I open a new terminal or tab for each thing. Joe asks about something, I open a terminal. Teammate asks about something, new terminal. Joe replies, I swap back to his terminal to look at the scrollback buffer. I’m closer to you when doing more dev work. One tab running a watcher for builds and restarting the app, one tab to run tests or whatever, a couple for poking around if I need to grep or curl or whatever.
- a96 3mo agoTerminal, few times a day. Shells, every few minutes.
- dawnerd 3mo agoI used to use volta but then they killed it and told people to switch to mise. The mise setup is just way too complicated. I just am tired of having different config files for different tooling when it should just read whats in the package.json and be done with it.
- bin_bash 3mo agopackage.json config is supported https://mise.jdx.dev/lang/node.html#nvmrc-node-version-and-package-json-support https://mise.jdx.dev/lang/node.html#nvmrc-node-version-and-p...
- dawnerd 3mo agoThe problem is you still have to know to look for that setting to enable it. That’s too much work when I can just stick with the older tools that work without touching anything.
- nickjj 3mo agoI had performance issues with Mise which I reported here https://github.com/jdx/mise/discussions/4821 https://github.com/jdx/mise/discussions/4821. Unrelated to Mise but related to zsh, there's also https://github.com/jeffreytse/zsh-vi-mode/issues/316 https://github.com/jeffreytse/zsh-vi-mode/issues/316. I noticed this plugin was causing a lot of delay. Learned a decent amount about zsh profiling from that issue.
- tecoholic 3mo agoSecond this. Just add Starship.rs for prompt and offload tool chain version handling to mise. That covers about 100% of my needs. If your org doesn’t use mise, just add mise.toml to your global gitignore. Mise tries to be a single tool covering multiple needs, but don’t have to use it that way. I just manage toolchain versions and envvars (replace direnv).
- poly2it 3mo agoIs this poor man's Nix/direnv, or does it do anything else?
- anon7000 3mo agoYou can also just replace nvm with fnm (https://github.com/Schniz/fnm https://github.com/Schniz/fnm). It’s a lot faster and generally works better too.