Not sure. I just did a test between npm, yarn and pnpm and it seems that even though pnpm is still lighter weight and generally faster than npm, yarn is reliably fast (but varies depending on the versions of everything).
I'm leaving my benchmarks below but I realized partly why npm wasn't as fast was because I was on an older node version (so, npm version 6.14.16 in my case with yarn 1.22.17). You should definitely checkout this post for a far better breakdown though: blog.logrocket.com/javascript-pack...
For example, I got the following results testing each one (note that this was just a single benchmark for each package manager) so it's fairly anecdotal, however it's fairly typical of my experience.
59f86ef90 43be9d222 e906cdd98 #16633 npm now parallelizes tarball extraction across multiple child process workers. This can significantly speed up installations, specially when installing from cache, and will improve with number of processors. (@zkat)
Does npm indicate in this release note that it already uses parallel downloads
So, is
yarn
faster thannpm
in most cases? I wonder what advantages the serial installation process has. why doesnpm
adopt it?Not sure. I just did a test between
npm
,yarn
andpnpm
and it seems that even thoughpnpm
is still lighter weight and generally faster thannpm
,yarn
is reliably fast (but varies depending on the versions of everything).I'm leaving my benchmarks below but I realized partly why
npm
wasn't as fast was because I was on an older node version (so,npm
version 6.14.16 in my case withyarn
1.22.17). You should definitely checkout this post for a far better breakdown though: blog.logrocket.com/javascript-pack...For example, I got the following results testing each one (note that this was just a single benchmark for each package manager) so it's fairly anecdotal, however it's fairly typical of my experience.
Fresh install: (no caches)
npm
1m 23spnpm
50syarn
41sFresh install: (with caches)
npm
1m 7spnpm
32syarn
15sgithub.com/npm/npm/releases/tag/v5...
Does npm indicate in this release note that it already uses parallel downloads
Since parallel downloads are faster than serial downloads, why hasn't npm changed the way that download dependencies after multiple iterations