Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

perf(run): improve yarn run performance #2577

Merged
merged 2 commits into from Mar 8, 2021
Merged

perf(run): improve yarn run performance #2577

merged 2 commits into from Mar 8, 2021

Conversation

paul-soporan
Copy link
Member

@paul-soporan paul-soporan commented Mar 7, 2021

What's the problem this PR addresses?

Helps a bit with #2575.

Testing it on https://github.com/jest-community/eslint-plugin-jest (CC @SimenB), it seems to save ~345.7 ms.

This PR doesn't change anything linker-specific, so it should also slightly optimize yarn run with the PnP linker.

Because #2576 overlaps with this PR in some places, the combined perf improvements of the 2 PRs will probably only save something like ~350-400ms.

How did you fix it?

  • Parallelize the makePathWrappers.
  • Bypass the linkers (and the ZipOpenFS) if the package is a workspace.
  • Don't compute the packageAccessibleBinaries inside executePackageAccessibleBinaries again, as they are already computed inside the execute method of the yarn run command.
  • Parallelize the async part of the loop in getPackageAccessibleBinaries - the remaining part still has to be sequential to guarantee consistent overwrite order of the binaries.

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 bef2039 into master Mar 8, 2021
@arcanis arcanis deleted the paul/perf/yarn-run branch March 8, 2021 15:25
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.

None yet

2 participants