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

Small optimization around ProjectState modification operations #72313

Conversation

ToddGrun
Copy link
Contributor

Ensure ProjectState modification operations would actually create a modified ProjectState before creating the new ProjectState

When opening Roslyn.sln, I see 32800 ProjectState.AddDocument calls, of which 6700 are sending in an empty array to add. Similarly, I see 6700 ProjectState.RemoveAllDocuments calls, of which 4700 are called on ProjectState instances where the DocumentStates/AdditionalDocumentStates/AnalyzerConfigDocumentStates are all empty.

…dified ProjectState before creating the new ProjectState

When opening Roslyn.sln, I see 32800 ProjectState.AddDocument calls, of which 6700 are sending in an empty array to add. Similarly, I see 6700 ProjectState.RemoveAllDocuments calls, of which 4700 are called on ProjectState instances where the DocumentStates/AdditionalDocumentStates/AnalyzerConfigDocumentStates are all empty.
@ToddGrun ToddGrun requested a review from a team as a code owner February 28, 2024 18:04
@dotnet-issue-labeler dotnet-issue-labeler bot added Area-IDE untriaged Issues and PRs which have not yet been triaged by a lead labels Feb 28, 2024
@ToddGrun
Copy link
Contributor Author

Messed up a cherrypick so this is the real PR

@ToddGrun ToddGrun merged commit d21bece into dotnet:main Mar 1, 2024
27 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area-IDE untriaged Issues and PRs which have not yet been triaged by a lead
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants