3 ms·
I have been using asdf for over a year now, and I haven't seen `node -v` take so long. Actually, I used to use nvm and it was much slower than asdf, which was m
by wpyoga 4y ago
I have been using asdf for over a year now, and I haven't seen `node -v` take so long. Actually, I used to use nvm and it was much slower than asdf, which was my main motivation to switch.
I'm wondering if the lack of slowness I've seen could be due to my simplistic setup: globally set nodejs version, single nodejs version installed, with other tools like git installed by the distro package manager. I also have golang and some other stuff like rclone installed using asdf, but not much more.
Did you also have a similar experience when initially installing node? Did you notice what triggered it or when did asdf start to become slow?
I like asdf and would like to avoid making it slow on my laptop.
Oh and can I safely assume that your home directory is on an SSD and not on an HDD?
- deleted 4y ago[deleted]
- jdxcode 4y agoI'm on an M1 MacBook Pro 16". The performance issues are well understood by the asdf team and the Github issue with most comments is on the topic: https://github.com/asdf-vm/asdf/issues/290 https://github.com/asdf-vm/asdf/issues/290 This was with a half dozen plugins and use_legacy_file disabled. Hardly an edge-case. Though I'll note in other tests it was around 200ms (which is the number I put in the README to be fair). @danfritz in this thread said his can take over 2 seconds! Out of curiosity, what is the difference between `time node -v` and `time ~/.asdf/installs/nodejs/*/bin/node -v`? I've never seen it not add at least 100ms.
- aorth 4y agoFor me, on a ThinkPad 14s with an SSD on Linux: $ time node -v v18.13.0 node -v 0.05s user 0.02s system 94% cpu 0.073 total $ time ~/.asdf/installs/nodejs/18.13.0/bin/node -v v18.13.0 ~/.asdf/installs/nodejs/18.13.0/bin/node -v 0.00s user 0.00s system 94% cpu 0.004 total I've never noticed asdf being slow, so I'm surprised to see those extra ms on top when calling the shimmed node.
- wpyoga 4y agoApologies for the delay. Now I do notice a delay when using the asdf shim instead of running the binary directly. But it's nowhere near 900ms. I'm on a T480s with i5 CPU and SSD: $ time node --version v18.13.0 real 0m0.080s user 0m0.079s sys 0m0.027s $ time ~/.asdf/installs/nodejs/lts/bin/node --version v18.13.0 real 0m0.009s user 0m0.006s sys 0m0.003s