Uh oh!
There was an error while loading. Please reload this page.
[release/7.0] Fix delegate allocation in CachingContext.GetOrAddJsonTypeInfo - #80513
Conversation
…t#80437) * Fix delegate allocation in CachingContext.GetOrAddJsonTypeInfo * Address PR feedback
ghost
commented
Jan 11, 2023
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.
|
ericstj
commented
Jan 11, 2023
Needs the servicing authoring. cc @carlossanlop |
ericstj
commented
Jan 11, 2023
Test failing is |
eiriktsarpalis
commented
Jan 12, 2023
Approved by Tactics over email. |
eiriktsarpalis
commented
Jan 12, 2023
It's a reflection-based test validating that the I think it's because the |
Sergio0694
commented
Jan 12, 2023
Just curious, will this also be shipped for the OOB package? 🙂 |
carlossanlop
commented
Jan 12, 2023
Yep. This commit will take care of that: 81a7358 |
Sergio0694
commented
Jan 12, 2023
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.