-
Notifications
You must be signed in to change notification settings - Fork 5.3k
Make ObjectConverter use ConverterStrategy.Object #65748
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
Make ObjectConverter use ConverterStrategy.Object #65748
Conversation
|
Tagging subscribers to this area: @dotnet/area-system-text-json Issue DetailsMakes a few infrastructural changes in anticipation of #63747. More specifically
|
|
Please report the benchmark changes. Several hot path methods were changed. |
|
@steveharter I ran the full suite and benchmark numbers were identical, no substantial speed-ups or regressions here. |
src/libraries/System.Text.Json/src/System/Text/Json/Serialization/JsonConverterOfT.WriteCore.cs
Show resolved
Hide resolved
src/libraries/System.Text.Json/src/System/Text/Json/Serialization/JsonConverterOfT.cs
Show resolved
Hide resolved
src/libraries/System.Text.Json/src/System/Text/Json/Serialization/JsonConverterOfT.cs
Show resolved
Hide resolved
src/libraries/System.Text.Json/src/System/Text/Json/Serialization/JsonConverterOfT.cs
Show resolved
Hide resolved
src/libraries/System.Text.Json/src/System/Text/Json/Serialization/JsonConverterOfT.cs
Show resolved
Hide resolved
...s/System.Text.Json/src/System/Text/Json/Serialization/JsonSerializer.Write.HandleMetadata.cs
Show resolved
Hide resolved
src/libraries/System.Text.Json/src/System/Text/Json/Serialization/JsonConverterOfT.cs
Show resolved
Hide resolved
src/libraries/System.Text.Json/src/System/Text/Json/Serialization/JsonConverterOfT.cs
Show resolved
Hide resolved
src/libraries/System.Text.Json/src/System/Text/Json/Serialization/JsonConverterOfT.cs
Outdated
Show resolved
Hide resolved
src/libraries/System.Text.Json/src/System/Text/Json/Serialization/WriteStack.cs
Show resolved
Hide resolved
|
Regression on windows dotnet/perf-autofiling-issues#3944 and dotnet/perf-autofiling-issues#3983 |
Makes a few infrastructural changes in anticipation of #63747. More specifically
ObjectConverter(the polymorphic converter forobject) useConverterStrategy.Objectinstead ofConverterStrategy.Value. This was an important corner case complicating our existing implementations of polymorphism and reference handling.JsonConverter<T>.TryWriteand avoids rerunning the calculations in polymorphic converters or continuations.JsonConverter<T>.TryWrite/TryReadmethods removing redundant checks and moving logic specific toObjectConverterto the converter itself.