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

Refactor serializer options usage and enhance caching in workflow serialization #5275

Merged
merged 2 commits into from
Apr 25, 2024

Conversation

sfmskywalker
Copy link
Member

This update refactors multiple classes dealing with JSON serialization. The usage of serializer options now includes a caching mechanism to avoid unnecessary recomputation. 'CreateOptions' method is replaced by a 'GetOptions' method that considers cached options. Classes are adjusted to clone options when necessary, ensuring a fresh and accurate context each time.

Closes #5144

…ialization

This update refactors multiple classes dealing with JSON serialization. The usage of serializer options now includes a caching mechanism to avoid unnecessary recomputation. 'CreateOptions' method is replaced by a 'GetOptions' method that considers cached options. Classes are adjusted to clone options when necessary, ensuring a fresh and accurate context each time.
@sfmskywalker sfmskywalker requested review from a team April 25, 2024 08:31
This commit refactors how options are handled for JSON serializers in Elsa's workflow modules. JSON serializer options are now handled more efficiently, by directly using the provided options in `JsonIgnoreCompositeRootConverter` and setting up internal serializer options in `ObjectConverter`. Unnecessary methods related to the cloning of serializer options have been removed.
@sfmskywalker sfmskywalker merged commit 1e6aee4 into main Apr 25, 2024
3 checks passed
@sfmskywalker sfmskywalker deleted the perf/5144 branch April 25, 2024 09:42
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.

[Perf] JsonSerializationOption instances should be reused
3 participants