-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
Improves boot time #4261
Merged
Merged
Improves boot time #4261
Conversation
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
merceyz
requested changes
Mar 24, 2022
packages/yarnpkg-cli/sources/tools/getPluginConfiguration.val.js
Outdated
Show resolved
Hide resolved
merceyz
requested changes
Mar 24, 2022
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Moved the builtin patch behind lazy imports
Moved the worker hook behind a lazy import
Moved the PnP hook behind a lazy import
Without bundle splitting these can be reverted as they are just functions
packages/yarnpkg-cli/sources/tools/backportClipanionCompatibility.ts
Outdated
Show resolved
Hide resolved
merceyz
previously approved these changes
Mar 25, 2022
I updated the benchmark results to the current state of this PR |
13 tasks
merceyz
approved these changes
Mar 26, 2022
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
What's the problem this PR addresses?
Yarn is currently a little slow to start. Even a
yarn --version
takes ~280ms on my (slow) machine.How did you fix it?
This diff implements bundle splitting by adding a--split
option to the bundle generator that, when used, causes it to emit a self-extracting file that unpacks the chunks on disk then runs them. In practice it isn't more performant, so it's unlikely to be enabled by default, but having this capability can be useful for experimentation purposes.A few other runtime speed improvements not directly related to it are also implemented.got
import into type importsyup
from the modules exposed to plugins (was legacy)Checklist