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

Optimization of (de)serialization of ProjectId.DebugNames #73734

Merged
merged 2 commits into from
May 28, 2024

Conversation

ToddGrun
Copy link
Contributor

This string was showing up in traces for both serialization and deserialization during a find all references operation.

*** VS, before ***
image

*** VS, after ***
image

*** OOP, before ***
image

*** OOP, after ***
image

This string was showing up as about 3% in both serialization and deserialization during a find all references operation.
@ToddGrun ToddGrun requested a review from a team as a code owner May 28, 2024 00:34
@dotnet-issue-labeler dotnet-issue-labeler bot added Area-IDE untriaged Issues and PRs which have not yet been triaged by a lead labels May 28, 2024
@ToddGrun ToddGrun changed the title Optimization (de)serialization of ProjectId.DebugNames Optimization of (de)serialization of ProjectId.DebugNames May 28, 2024
// This ProjectId has previously been deserialized. Attempt to find it's
// debugName from the cache. This *should* always succeed, but if not, it's
// ok to proceed with a null debugName.
_debugNames.TryGetValue(id, out debugName);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Don't love this. But I'm willing to try it out. Seems like we could have a small race where some IDs don't have a debug name. But ideally it's a very small amount.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I changed this a bit in the second commit to replace the value in the cache if we receive a subsequent message that contains the debug name

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice

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.

4 participants