3 ms·
I don't see this at all, what's more worrying is that npm 3.* is apparently way slower than npm 2.* I did this test on a npm library I wrote, installs some tes
by swang 11y ago
I don't see this at all, what's more worrying is that npm 3.* is apparently way slower than npm 2.*
I did this test on a npm library I wrote, installs some test tools and also has to compile some gyp stuff
2.14.2
progress=false
real 0m26.589s
user 0m12.086s
sys 0m3.362s
progress=true
real 0m29.553s
user 0m12.455s
sys 0m3.486s
3.5.2
progress=false
real 0m57.489s
user 0m13.298s
sys 0m3.421s
progress=true
real 1m1.084s
user 0m15.690s
sys 0m3.644s
While I don't see any significant difference between progress bars or none for 3.x, what is 3.x doing that causes almost 30 seconds more churning?
- rhinoceraptor 11y agoIt uses a very different dependency resolution algorithm, the biggest difference as I understand it is it will install dependencies maximally flat whereas npm 2 was much more nested. I believe the reason it is slower is it can't do as much parallelism as npm 2. Also, npm 2 was susceptible to a lot of race conditions and non-determinism, especially with compiled dependencies.