4 ms·
Just tried on a couple of projects with a lot of dependencies, we moved to yarn a while ago due to performance issues and it seems to be resolved. On cold cach
by eknkc 9y ago
Just tried on a couple of projects with a lot of dependencies, we moved to yarn a while ago due to performance issues and it seems to be resolved.
On cold cache:
Yarn: 20.94 seconds
NPM5: 21.11 seconds
With cache:
Yarn: 10.35 seconds
NPM5: 15.20 seconds
For some reason, when node_modules folder is still there, yarn exits in a couple hundres milliseconds but npm5 does something for around 5 seconds.
Haven't checked lock file / installation consistency stuff. Yarn has been great on that too so we have no intention to go back but this is a decent release.
- gtirloni 9y agoAlso ran some numbers here (with warm cache. node 6.10.3). * yarn: 25s * npm@5: 28s * npm@4: 63s * npm@3: 68s So performance is now comparable, which is awesome, but I'd still stick to yarn because we have been burned too many times by npm v2/v3 with call stack issues and other errors. I don't have the energy (or the time/faith) to go through that again. Competition is wonderful though. I'll check npm again in 6-12 months and see what the community thinks of it before switching again.
- farskipper 9y agoamen
- ryanar 9y agoIf I recall correctly, npm5 with an existing node_modules folder still goes out to the internet and checks some data whereas yarn does not.
- abritinthebay 9y agoYup, tho it's configurable and you can set --prefer-offline to true to avoid it
- KayL 9y agomy test: npm@5 28.274s vs 11.60s Yarn @Windows10, SSD, warn cache
- abritinthebay 9y agoI'd be curious to see the warmed cache with --prefer-offline as I'm betting that's probably the time suck there.