Skip to content
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 support for System.Text.Json #117

Open
Astn opened this issue May 1, 2020 · 2 comments
Open

Add support for System.Text.Json #117

Astn opened this issue May 1, 2020 · 2 comments

Comments

@Astn
Copy link
Owner

Astn commented May 1, 2020

Why?

  • Performance
  • System.Net.Json is a built in

See docs
https://docs.microsoft.com/en-us/dotnet/standard/serialization/system-text-json-migrate-from-newtonsoft-how-to

@Astn Astn changed the title Add support for System.Net.Json Add support for System.Text.Json May 1, 2020
@Astn
Copy link
Owner Author

Astn commented Jan 22, 2021

I've pushed a branch up that starts work on this. Feel free to collaborate on it with me.
branch: https://github.com/Astn/JSON-RPC.NET/tree/SwitchToSystem.Text.Json

@Astn
Copy link
Owner Author

Astn commented Sep 10, 2021

Initial tests show this branch is almost 2x as fast the current approach.

Starting benchmark
processed 50 rpc in      0ms for         ∞ rpc/sec
processed 100 rpc in     0ms for         ∞ rpc/sec
processed 300 rpc in     0ms for         ∞ rpc/sec
processed 1,200 rpc in   3ms for         400,000.00 rpc/sec
processed 6,000 rpc in   11ms for        545,454.55 rpc/sec
processed 36,000 rpc in          83ms for        433,734.94 rpc/sec
processed 252,000 rpc in         686ms for       367,346.94 rpc/sec
Finished benchmark...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant