Live data from Hacker News

Disabling npm's progress bar yields a 2x npm install speed improvement

twitter.com

1–10 of 187 posts

Re: Disabling npm's progress bar yields a 2x npm install speed improvement

#4
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?

Re: Disabling npm's progress bar yields a 2x npm install speed improvement

#5
post #4

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…

It 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.

Re: Disabling npm's progress bar yields a 2x npm install speed improvement

#9
Progress bar or not, npm has gotten extremely slow with v3, to the extent that someone is working on a performance-centered alternative called ied:

http://gugel.io/ied/

installs are literally the #1 thing npm needs to do well, and I really hope we see some improvement soon.

Re: Disabling npm's progress bar yields a 2x npm install speed improvement

#10

...has he controlled for network speed? Unless he's set up a local NPM caching proxy, he's going over the 'net for these packages. It'll take more than 1 datum before I believe this hype.

Many people have confirmed a major speed improvement. I've repeated this with an empty cache, primed cache and in different orders many times and have always got the same results. Having said that, a good number of people have reported seeing no speed improvement too.
Post reply on HN