benchmarks-of-javascript-package-managers icon indicating copy to clipboard operation
benchmarks-of-javascript-package-managers copied to clipboard

Replaces "Yarn PnP" by "Yarn 2"

Open arcanis opened this issue 5 years ago • 6 comments

Fixes #31

I've also enabled the Yarn 2 benchmark for the parts that were previously n/a by removing the .pnp.js where the node_modules folder would have been removed otherwise.

arcanis avatar Feb 11 '20 18:02 arcanis

Now that I think about it, now that the cache and the node_modules are effectively the same, the results aren't as easy to interpret 🤔 Hmm maybe the "n/a" approach was more sensible ...

arcanis avatar Feb 11 '20 18:02 arcanis

I'll restore the n/a, use a different color for Yarn 2.x, add the "1.x" label to the column, and maybe sort the table so that all the "caches" / "no caches" are put together - it really highlights where is 2.x faster or slower.

Btw @zkochan, what's your secret sauce for "cache / no lockfile / n_m"? I'd expect it to take at least the time needed to fetch the metadata from the registry 🤔

arcanis avatar Feb 11 '20 19:02 arcanis

I think that case is so fast because even though there is no lockfile near the package.json, there is still a lockfile duplicate inside node_modules/.pnpm/lock.yaml.

pnpm has two lockfiles. They have the same format. One is in the same folder in which package.json and the other one inside node_modules. This is great because after a branch switch, for instance, we just make a diff of the two lockfiles and we know what to remove or add.

zkochan avatar Feb 11 '20 19:02 zkochan

It would be nice to update the benchmarks to use Yarn 2. I'd love to see how pnpm v5 performs compared to it.

zkochan avatar May 24 '20 20:05 zkochan

Anyone working on getting this merged?

SgtPooki avatar Jan 29 '21 07:01 SgtPooki

I don't think so because Yarn now maintains its own benchmarks: https://yarnpkg.com/benchmarks

I think I would prefer to keep only benchmarks that compare non-PnP package managers in this repo: npm7, pnpm, and Yarn2 with node-linker=node-modules

and we can add a link to Yarn benchmarks to see how PnP performs compared to pnpm.

zkochan avatar Jan 29 '21 13:01 zkochan