Skip to content

Conversation

@arcanis
Copy link
Member

@arcanis arcanis commented Sep 18, 2025

What's the problem this PR addresses?

It came to me that since pnpm no longer runs postinstall scripts by default, the benchmark was a little skewed since Yarn (and npm) do. The benchmarks are intended to compare apples to apples, so either postinstalls should be disabled in Yarn / npm as well, or they should be enabled in pnpm. I think it makes more sense to enable them, as it can uncover bugs that would otherwise be hidden away.

How did you fix it?

Enabled the postinstall scripts in the package manager benchmarks.

To be fair it probably doesn't change much, if anything - the full cold Gatsby benchmark shows around 2 seconds of removed install time around Feb 3rd 2025 which I think is caused by the lack of postinstall, although I'm not certain, but that's about it. Pnpm remains really fast, kudos!

Screenshot 2025-09-18 at 10 43 02

Curiously the same change occurs in the "Recurrent calls" benchmark which probably shouldn't need to run postinstall scripts. Does pnpm have a bug causing it to rebuild postinstall scripts when they aren't needed?

Checklist

  • I have set the packages that need to be released for my changes to be effective.
  • I will check that all automated PR checks pass before the PR gets reviewed.

@arcanis arcanis merged commit a25b3bf into master Sep 22, 2025
25 of 26 checks passed
@arcanis arcanis deleted the mael/pnpm-install-scripts branch September 22, 2025 18:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants