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

AVRO-4042: [java] Precache ObjectMapper to avoid recreation #3123

Merged
merged 1 commit into from
Aug 29, 2024

Conversation

andrew-ie
Copy link
Contributor

@andrew-ie andrew-ie commented Aug 27, 2024

What is the purpose of the change

ObjectMapper is an expensive, thread-safe object. By creating just one instance, we can avoid unnecessary recalculations.

Verifying this change

(Please pick one of the following options)

This change is already covered by existing tests, such as TestJacksonUtils or TestSchemaBuilder

Documentation

  • Does this pull request introduce a new feature? (yes / no) - No

@github-actions github-actions bot added the Java Pull Requests for Java binding label Aug 27, 2024
ObjectMapper is an expensive, immutable and thread-safe object.
By creating just one instance, we can avoid unnecessary recalculations.
@opwvhk opwvhk merged commit 971b0a8 into apache:main Aug 29, 2024
8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Java Pull Requests for Java binding
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants