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

[rush] Improve startup performance with read cache #2838

Merged
merged 3 commits into from
Aug 26, 2021

Conversation

dmichon-msft
Copy link
Contributor

Summary

Introduces read caching into RigConfig and RushProjectConfiguration, to reduce redundant work during startup.
Stops instantiating an Ignorer instance if the project does not have a rush-project.json (either locally or from a rig).

Details

Instantiation of Ignorer was superfluous when no rules were present, and saves performance by being skipped.
Caching of RigConfig and RushProjectConfiguration removes duplicate reads between the ProjectChangeAnalyzer initialization and subsequent reads for the build cache feature.

How it was tested

Comparing rush tab-complete and rush list between the repo command and the locally built version shows about a 50% savings in the @rushstack repo.

@iclanton
Copy link
Member

iclanton commented Aug 3, 2021

When are projects' RushProjectConfigurations getting instantiated multiple times in the same Rush run?

@dmichon-msft
Copy link
Contributor Author

When are projects' RushProjectConfigurations getting instantiated multiple times in the same Rush run?

Once by ProjectChangeAnalyzer, a second time for the build cache checks.

@iclanton
Copy link
Member

iclanton commented Aug 5, 2021

Can you create changelogs?

libraries/rig-package/src/RigConfig.ts Outdated Show resolved Hide resolved
libraries/rig-package/src/RigConfig.ts Outdated Show resolved Hide resolved
@iclanton iclanton added this to In Progress in Bug Triage Aug 10, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Archived in project
Bug Triage
  
Closed
Development

Successfully merging this pull request may close these issues.

None yet

2 participants