-
Notifications
You must be signed in to change notification settings - Fork 62
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
add type include / exclude for polymorphic serializers #226
Comments
Recommend implementing this on Hyperion first. Shouldn't have a performance impact if not explicitly enabled (opt-in.) |
Resolved via #242 |
Performance numbers associated with this change, as collected by @Arkatufus Summary.NET Framework 4.7.1BenchmarkDotNet=v0.13.1, OS=Windows 10.0.19041.1165 (2004/May2020Update/20H1)
AMD Ryzen 9 3900X, 1 CPU, 24 logical and 12 physical cores
[Host] : .NET Framework 4.8 (4.8.4400.0), X64 RyuJIT
DefaultJob : .NET Framework 4.8 (4.8.4400.0), X64 RyuJIT Before
After
.NET 5.0BenchmarkDotNet=v0.13.1, OS=Windows 10.0.19041.1165 (2004/May2020Update/20H1)
AMD Ryzen 9 3900X, 1 CPU, 24 logical and 12 physical cores
.NET SDK=5.0.201
[Host] : .NET 5.0.4 (5.0.421.11614), X64 RyuJIT
DefaultJob : .NET 5.0.4 (5.0.421.11614), X64 RyuJIT Before
After
.NET Core 3.1BenchmarkDotNet=v0.13.1, OS=Windows 10.0.19041.1165 (2004/May2020Update/20H1)
AMD Ryzen 9 3900X, 1 CPU, 24 logical and 12 physical cores
.NET SDK=5.0.201
[Host] : .NET Core 3.1.13 (CoreCLR 4.700.21.11102, CoreFX 4.700.21.11602), X64 RyuJIT
DefaultJob : .NET Core 3.1.13 (CoreCLR 4.700.21.11102, CoreFX 4.700.21.11602), X64 RyuJIT Before
After
|
And disallow unsafe types is enabled by default: Hyperion/src/Hyperion/SerializerOptions.cs Line 104 in 5284534
So this benchmark definitely included them. Looks to me like the overhead from introducing the unsafe type filtering is pretty minimal due to caching. |
See akkadotnet/akka.net#5026 for full proposal. Covers both Hyperion and Newtonsoft.Json.
The text was updated successfully, but these errors were encountered: