nvm: Performance: `nvm use default` slow, slows down shell startup (nvm.sh)
. ~/.nvm/nvm.sh
adds about half a second to shell startup. The main culprits seem to be nvm ls default
and nvm use default
- commenting them out drops the timing reported by time . ~/.nvm/nvm.sh
to near-zero.
I wonder if we can speed those up, or replace them with a cheaper operation for shell startup?
About this issue
- Original URL
- State: closed
- Created 9 years ago
- Reactions: 14
- Comments: 23 (11 by maintainers)
Commits related to this issue
- Improve startup performance. Closes #703 — committed to joliss/nvm by joliss 9 years ago
- Improve startup performance. Closes #703 — committed to joliss/nvm by joliss 9 years ago
- Improve startup performance. Closes #703 — committed to joliss/nvm by joliss 9 years ago
- Merge pull request #705 from joliss/performance Improve startup performance. Closes #703 — committed to nvm-sh/nvm by ljharb 9 years ago
- Remove prefix check to speed up performance People who actually read the docs should not suffer - see creationix/nvm#860 and creationix/nvm#703 — committed to AGhost-7/nvm by AGhost-7 7 years ago
- Remove prefix check to speed up performance People who actually read the docs should not suffer - see creationix/nvm#860 and creationix/nvm#703 — committed to AGhost-7/nvm by AGhost-7 7 years ago
@dylanpyle Are you using
oh-my-zsh
? What’s your output ofnvm debug
? If younvm unalias default
, does the slowdown disappear?Still takes almost a second for me to startup. If I remove the
. ~/.nvm/nvm.sh
my shell loads near instantly…