-
Notifications
You must be signed in to change notification settings - Fork 4k
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
Optimization of (de)serialization of ProjectId.DebugNames #73734
Conversation
This string was showing up as about 3% in both serialization and deserialization during a find all references operation.
src/Workspaces/Remote/Core/Serialization/MessagePackFormatters.cs
Outdated
Show resolved
Hide resolved
// 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); |
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.
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.
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.
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
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.
Nice
This string was showing up in traces for both serialization and deserialization during a find all references operation.
*** VS, before ***
*** VS, after ***
*** OOP, before ***
*** OOP, after ***