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

Improve serialization perfromance in .Net 6+ apps #14

Open
mrf460 opened this issue Feb 17, 2023 · 0 comments
Open

Improve serialization perfromance in .Net 6+ apps #14

mrf460 opened this issue Feb 17, 2023 · 0 comments

Comments

@mrf460
Copy link
Contributor

mrf460 commented Feb 17, 2023

I think we should look into implementing System.Text.Json source generation in Hydra. It should improve serialization and startup performance in .NET 6+ apps (more info here).

It will require some refactoring, since we will have to add multi-platform targeting and use new 6-specific APIs; I'd rather not target 6+ exclusively.

We will also have to figure out how to allow users to optionally define their own JsonSerializerContext and pass it to Hydra if they care to. This is due to the fact that we won't know their bdy classes at serialization time beforehand. Doing this with a clean API will be a bit of a challenge, but there are examples we can look at for inspiration (eg Asp Core's AddControllers has a mechanism that looks nice).

This should only really matter for high-performance scenarios, but it is still worth looking into IMO

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

No branches or pull requests

1 participant