- Notifications
You must be signed in to change notification settings - Fork1
local-npm/test-local-npm-speed
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
Compare the
npm install
times forlocal-npm versus regularnpm
, using some popular JavaScript repos.
- test-local-npm-speed
- Summary-nolanlawson/tiny-queue-lodash/lodash-substack/node-browserify-strongloop/express-facebook/react-gulpjs/gulp-pouchdb/pouchdb
- Full data
- nolanlawson/tiny-queue
- lodash/lodash
- substack/node-browserify
- strongloop/express
- facebook/react
- gulpjs/gulp
- pouchdb/pouchdb
- Notes
- Reproduce these results
I started off with a small repo of mine,nolanlawson/tiny-queue
, then moved on to some popular libraries likelodash/lodash
andfacebook/react
. In each case, I'm just cloning the code from Github and runningnpm install
.
TLDR: Regular npm is faster for the firstnpm install
, but afterwardslocal-npm
is always faster, even afternpm cache clear
. Sometimes it's even 2x or 3x faster (e.g. 1m15.752s vs 3m50.467s to installfacebook/react
the 2nd time). This is kind of the point oflocal-npm
: it gets faster the more you run it, because it aggressively caches everything.
- 45.69% slower for first
npm install
- 3.22% faster for second
npm install
- 16.99% faster after
npm cache clear
- 34.26% slower for first
npm install
- 6.78% faster for second
npm install
- 2.75% slower after
npm cache clear
- 33.00% slower for first
npm install
- 5.64% faster for second
npm install
- 20.27% slower after
npm cache clear
- 29.44% slower for first
npm install
- 9.86% faster for second
npm install
- 15.16% faster after
npm cache clear
- 26.71% slower for first
npm install
- 8.89% slower for second
npm install
- 2.76% faster after
npm cache clear
- 10.40% slower for first
npm install
- 6.68% faster for second
npm install
- 12.54% slower after
npm cache clear
- 8.16% slower for first
npm install
- 6.13% faster for second
npm install
- 12.62% faster after
npm cache clear
- 1st npm install: 0m2.392s
- 2nd npm install: 0m1.263s
- After cache clean: 0m2.447s
- 1st npm install: 0m1.299s
- 2nd npm install: 0m1.305s
- After cache clean: 0m2.948s
- 1st npm install: 1m22.140s
- 2nd npm install: 0m48.855s
- After cache clean: 1m19.177s
- 1st npm install: 0m53.995s
- 2nd npm install: 0m52.407s
- After cache clean: 1m17.000s
- 1st npm install: 0m41.307s
- 2nd npm install: 0m26.133s
- After cache clean: 0m49.842s
- 1st npm install: 0m27.677s
- 2nd npm install: 0m27.695s
- After cache clean: 0m39.738s
- 1st npm install: 0m19.571s
- 2nd npm install: 0m13.149s
- After cache clean: 0m16.645s
- 1st npm install: 0m13.810s
- 2nd npm install: 0m14.587s
- After cache clean: 0m19.619s
- 1st npm install: 2m30.568s
- 2nd npm install: 1m54.844s
- After cache clean: 2m39.366s
- 1st npm install: 1m50.349s
- 2nd npm install: 1m44.638s
- After cache clean: 2m43.893s
- 1st npm install: 0m40.063s
- 2nd npm install: 0m36.125s
- After cache clean: 1m4.591s
- 1st npm install: 0m35.895s
- 2nd npm install: 0m38.711s
- After cache clean: 0m56.494s
- 1st npm install: 2m37.697s
- 2nd npm install: 2m2.765s
- After cache clean: 2m40.102s
- 1st npm install: 2m24.823s
- 2nd npm install: 2m10.778s
- After cache clean: 3m3.219s
The test is a little unfair, because mylocal-npm
has already downloaded all the metadata, but this is a typical use-case forlocal-npm
. (It replicates the npm metadata on first run, which can take a few hours.) I did clear out the tarballs before the test, though.
Also, repos tested later in the test may benefit from a slight boost, if they share any modules with a previous repo. But again, this is a typical use-case forlocal-npm
– the more you use it, the more that common tarballs will be pre-cached.
I find it interesting thatlocal-npm
is faster even after the secondnpm install
, which is when npm's cache is supposed to kick in. This suggests that npm is not caching as aggressively as it could be.
First,npm install -g local-npm && local-npm
. Then just clone this repo and runnpm test
. The python script can print a summary afterwards.
Warning: the test will override your local~/.npmrc
file! So you may want to donpmrc -c testing && npmrc testing
beforehand.
About
Script to test local-npm vs regular npm speeds
Resources
Uh oh!
There was an error while loading.Please reload this page.
Stars
Watchers
Forks
Releases
Packages0
Uh oh!
There was an error while loading.Please reload this page.
Contributors2
Uh oh!
There was an error while loading.Please reload this page.