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: Reduce the number of nodes walked during import completion commit. #77305

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

ToddGrun
Copy link
Contributor

@ToddGrun ToddGrun commented Feb 21, 2025

ImportAdderService.AddImportsAsync was previously doing a full tree walk (and realizing all the nodes in the tree) during override completion commit.

Noticed while looking at the csharp completion speedometer profile for the completion commit of override methods. Previously, this accounted for about 28% of CPU and 23% of allocations during CommitManager.TryCommit. With these changes applied, this enumeration is basically free.

*** Old CPU ***
image

*** New CPU ***
image

*** Old Allocations ***
image

*** New Allocations ***
image

@ToddGrun
Copy link
Contributor Author

Perf numbers look really good, going to escalate out of draft mode.

@ToddGrun ToddGrun changed the title WIP: Reduce the number of nodes that are walked during import completion commit. PERF: Reduce the number of nodes walked during import completion commit. Feb 22, 2025
@ToddGrun ToddGrun marked this pull request as ready for review February 22, 2025 03:58
@ToddGrun ToddGrun requested a review from a team as a code owner February 22, 2025 03:58
@ToddGrun
Copy link
Contributor Author

@dotnet/roslyn-ide -- this is ready for review

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant