-
Notifications
You must be signed in to change notification settings - Fork 4.7k
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
[release/7.0] Fix delegate allocation in CachingContext.GetOrAddJsonTypeInfo #80513
[release/7.0] Fix delegate allocation in CachingContext.GetOrAddJsonTypeInfo #80513
Conversation
…t#80437) * Fix delegate allocation in CachingContext.GetOrAddJsonTypeInfo * Address PR feedback
Tagging subscribers to this area: @dotnet/area-system-text-json, @gregsdennis Issue DetailsFixes #80430. Customer ImpactFixes a customer reported performance regression in STJ's metadata caching implementation, which will a allocate a new delegate on every metadata lookup operation. This becomes particularly noticeable when serializing object graphs containing many polymorphic values, for example large non-generic collections. TestingN/A. RiskLow. It is a small change that caches the metadata factory delegate in a field.
|
Needs the servicing authoring. cc @carlossanlop |
Test failing is
|
Approved by Tactics over email. |
It's a reflection-based test validating that the I think it's because the |
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
Just curious, will this also be shipped for the OOB package? 🙂 |
Yep. This commit will take care of that: 81a7358 |
Sweet, that's awesome! Thank you 😄 |
Approved by Tactics (7.0.3). |
Fixes #80430.
Customer Impact
Fixes a customer reported performance regression in STJ's metadata caching implementation, which will a allocate a new delegate on every metadata lookup operation. This becomes particularly noticeable when serializing object graphs containing many polymorphic values, for example large non-generic collections.
Testing
N/A.
Risk
Low. It is a small change that caches the metadata factory delegate in a field.