-
Notifications
You must be signed in to change notification settings - Fork 4.9k
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/6.0] Remove redundant allocations from JsonSerializerOptions.GetConverter calls #65898
Conversation
Tagging subscribers to this area: @dotnet/area-system-text-json Issue DetailsFixes Issue #65770, cherry-picks the fix from #65863. Customer ImpactFixes a customer reported issue. Currently every call to TestingN/A RiskLow. Brings back a trivial check in the global state initialization method.
|
@eiriktsarpalis @steveharter @layomia just noticed this change affects an OOB package. Per the servicing instructions, if the csproj has the Here are a couple of examples (we had to add the property on the next release because we forgot): #65523 #65733 Can one of you please add the change? |
@carlossanlop done. |
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.
Package change looks good.
Fixes Issue #65770, cherry-picks the fix from #65863.
Customer Impact
Fixes a customer reported issue. Currently every call to
JsonSerializerOptions.GetConverter
will force recreation of the default converters global state, which can substantially impact the allocation profile for custom converters that dynamically look up other converters. This is a regression from .NET 5.Diff without whitespace
Testing
N/A
Risk
Low. Brings back a trivial check in the global state initialization method.