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

Optimize translation to object conversion #344

Conversation

stefanolsen
Copy link
Contributor

This PR replaces the JsonConverter class with a reflection based converter. This is faster and allocated less memory in the process.

@stefanolsen
Copy link
Contributor Author

I have found that the GetAllResources query takes some time and allocates a lot of memory. Even when using a mock handler.

I guess that it comes from resolving and instantiating the handlers. I have not tried using the repository directly. But it might make it leaner.

@valdisiljuconoks valdisiljuconoks self-requested a review December 5, 2024 09:52
@valdisiljuconoks valdisiljuconoks self-assigned this Dec 5, 2024
@valdisiljuconoks valdisiljuconoks added this to the 9.0.0 milestone Dec 5, 2024
@valdisiljuconoks valdisiljuconoks changed the base branch from master to v9 December 5, 2024 09:52
@valdisiljuconoks
Copy link
Owner

handler resolution should be cached after it's resolved (as rarely handlers gonna change during runtime)

@valdisiljuconoks valdisiljuconoks merged commit 6468c50 into valdisiljuconoks:v9 Dec 5, 2024
2 of 3 checks passed
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

Successfully merging this pull request may close these issues.

2 participants