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

Generate Deserialize methods as well in System-Text.Json source generator. #57117

Closed
mrange opened this issue Aug 10, 2021 · 2 comments
Closed

Comments

@mrange
Copy link

mrange commented Aug 10, 2021

Hi.
I was asked if I had any further feedback on the JSON Serializer in ticket: #56995

One thing that came to mind is that in my experiments generating a deserialize method can lead to performance improvements.

I suspect you considered it and for some reason not implemented it but in case you are interested my testing shows an increase in performance with ~30% for a simple object when using generated code rather than metadata driven deserializer. In addition it seems to have positive impact on the memory aspect.

In case you are interested here is my experiment: https://github.com/mrange/T4JsonSerializer

@dotnet-issue-labeler dotnet-issue-labeler bot added area-System.Text.Json untriaged New issue has not been triaged by the area owner labels Aug 10, 2021
@ghost
Copy link

ghost commented Aug 10, 2021

Tagging subscribers to this area: @eiriktsarpalis, @layomia
See info in area-owners.md if you want to be subscribed.

Issue Details

Hi.
I was asked if I had any further feedback on the JSON Serializer in ticket: #56995

One thing that came to mind is that in my experiments generating a deserialize method can lead to performance improvements.

I suspect you considered it and for some reason not implemented it but in case you are interested my testing shows an increase in performance with ~30% for a simple object when using generated code rather than metadata driven deserializer. In addition it seems to have positive impact on the memory aspect.

In case you are interested here is my experiment: https://github.com/mrange/T4JsonSerializer

Author: mrange
Assignees: -
Labels:

area-System.Text.Json, untriaged

Milestone: -

@layomia
Copy link
Contributor

layomia commented Aug 10, 2021

Thanks. Yes, we did consider it but were running out of time for 6.0. Dup of #55043.

@layomia layomia closed this as completed Aug 10, 2021
@layomia layomia removed the untriaged New issue has not been triaged by the area owner label Aug 10, 2021
@ghost ghost locked as resolved and limited conversation to collaborators Sep 9, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants