Skip to content

Instantly share code, notes, and snippets.

@gtirloni
Last active July 8, 2017 14:34
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save gtirloni/bba708ad4a8e29389df4f1cdf7f638d9 to your computer and use it in GitHub Desktop.
Save gtirloni/bba708ad4a8e29389df4f1cdf7f638d9 to your computer and use it in GitHub Desktop.
Comparing local-npm and npm caching

Method

git clone https://github.com/GPII/universal
rm -rf node_modules
time npm install

npm 3.10.10

  • Run #1 - 3m3s (cold cache)
  • Run #2 - 1m9s
  • Run #3 - 1m21s
  • Run #4 - 1m28s
  • Run #5 - 1m13s

npm 3.10.10 + local-npm

  • Run #1 - 5m24s (cold cache)
  • Run #2 - 40s
  • Run #3 - 41s
  • Run #4 - 41s
  • Run #5 - 40s

npm 5.1.0

  • Run #1 - 58s (cold cache)
  • Run #2 - 26s
  • Run #3 - 25s
  • Run #4 - 25s
  • Run #5 - 25s

npm 5.1.0 + local-npm

  • Run #1 - 1m35s (cold cache)
  • Run #2 - 26s
  • Run #3 - 24s
  • Run #4 - 25s
  • Run #5 - 25s
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment