Created
January 31, 2020 18:08
-
-
Save jamonholmgren/b0fabc62a54207c178ab2a8ae0ad1683 to your computer and use it in GitHub Desktop.
Yarn 1 vs Yarn 2 vs NPM article
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Things that are important to us in a JS package manager | |
Yarn - NPM - Description | |
✔ ✔ 1. Predictability -- will install the same packages every time | |
✔ ✔ 2. Reliability -- it's not flaky / fail randomly | |
✔ ✔ 3. Caching -- local installs wherever possible (less network traffic/bandwidth) | |
✔ X 4. Speed -- needs to be fast | |
✔ ✔ 5. Cost of change -- needs to be manageable, both in terms of technical and also training-wise | |
✔ ✔ 6. Feature: outdated | |
✔ ✔ 7. Feature: interactive-upgrade | |
✔ ✔ 8. Broad support -- works with React Native, Node CLIs, web, etc | |
✔ ✔ 9. Community adoption -- can't be the reason people don't use Bowser | |
NPM fresh install (no cache, no lockfile) | |
npm install 67.11s user 40.88s system 161% cpu 1:06.74 total | |
npm install 66.94s user 39.40s system 162% cpu 1:05.30 total | |
NPM fresh install (with cache, no lockfile) | |
npm install 60.95s user 35.37s system 164% cpu 58.687 total | |
npm install 61.04s user 35.52s system 154% cpu 1:02.56 total | |
NPM fresh install (with cache, with lockfile) | |
npm install 92.22s user 58.75s system 126% cpu 1:58.90 total | |
npm install 80.29s user 53.39s system 164% cpu 1:21.35 total | |
npm install 74.04s user 50.48s system 161% cpu 1:17.03 total | |
NPM re-install (with cache, with lockfile) | |
npm install 27.21s user 2.53s system 126% cpu 23.431 total | |
npm install 27.68s user 2.39s system 128% cpu 23.328 total | |
npm install 28.61s user 2.47s system 126% cpu 24.488 total | |
Yarn fresh install (no cache, no lockfile) | |
yarn 59.60s user 83.07s system 226% cpu 1:03.03 total | |
yarn 56.48s user 85.41s system 260% cpu 54.478 total | |
Yarn fresh install (with cache, no lockfile) | |
yarn 34.47s user 54.89s system 212% cpu 42.013 total | |
yarn 31.65s user 52.54s system 223% cpu 37.592 total | |
Yarn fresh install (with cache, with lockfile) | |
yarn 30.28s user 53.91s system 292% cpu 28.757 total | |
yarn 27.79s user 50.89s system 281% cpu 27.933 total | |
Yarn re-install (with cache, with lockfile) | |
yarn 1.27s user 0.10s system 145% cpu 0.938 total | |
yarn 1.22s user 0.09s system 146% cpu 0.894 total | |
yarn 1.22s user 0.09s system 146% cpu 0.897 total | |
yarn 1.23s user 0.10s system 145% cpu 0.914 total | |
Berry fresh install (no cache, no lockfile) | |
yarn 147.28s user 12.83s system 100% cpu 2:38.95 total | |
yarn 143.12s user 11.99s system 99% cpu 2:36.14 total | |
Berry fresh install (with cache, no lockfile) | |
yarn 24.88s user 7.11s system 134% cpu 23.771 total | |
yarn 23.77s user 7.31s system 125% cpu 24.719 total | |
Berry fresh install (with cache, with lockfile) | |
yarn 13.37s user 6.02s system 145% cpu 13.373 total | |
❯ time npm --version ✱ | |
6.13.4 | |
npm --version 0.15s user 0.05s system 88% cpu 0.221 total | |
~/Code/Temp/PizzaApp master* | |
❯ time yarn --version ✱ | |
1.21.1 | |
yarn --version 0.15s user 0.05s system 97% cpu 0.199 total | |
~/Code/Temp/PizzaApp master* | |
❯ node --version ✱ | |
v13.5.0 | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment