-
Notifications
You must be signed in to change notification settings - Fork 4.8k
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
Cache DocumentUrl in PortablePdbSymbolReader #79804
Conversation
This uses the exact same strategy as the unmanaged reader (`Dictionary` with a `lock` around `this`).
Tagging subscribers to this area: @agocke, @MichalStrehovsky, @jkotas Issue DetailsThis uses the exact same strategy as the unmanaged reader ( That was 100,000+ string allocations in a hello world: Cc @dotnet/ilc-contrib
|
Why is not |
We call this API: runtime/src/libraries/System.Reflection.Metadata/src/System/Reflection/Metadata/MetadataReader.cs Lines 1352 to 1355 in a92c5bc
Which calls this: runtime/src/libraries/System.Reflection.Metadata/src/System/Reflection/Metadata/Internal/BlobHeap.cs Lines 185 to 213 in a92c5bc
The other runtime/src/libraries/System.Reflection.Metadata/src/System/Reflection/Metadata/MetadataReader.cs Lines 1060 to 1063 in a92c5bc
|
Digging more into it, the problem seems to be that the caching string decoder caches things by pointer, but these document names are composed from chunks or something like that. |
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.
LGTM!
This uses the exact same strategy as the unmanaged reader (
Dictionary
with alock
aroundthis
- wouldn't be my first choice, but we should use the same thing).That was 100,000+ string allocations in a hello world:
Cc @dotnet/ilc-contrib