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

possible perf issues if you upgrade to Jackson 2.17 #998

Open
pjfanning opened this issue Mar 14, 2024 · 0 comments
Open

possible perf issues if you upgrade to Jackson 2.17 #998

pjfanning opened this issue Mar 14, 2024 · 0 comments

Comments

@pjfanning
Copy link
Contributor

See FasterXML/jackson-module-scala#672 Thanks to @plokhotnyuk for doing the research.

jackson-core has a new buffer recycler default in 2.17 that will cause perf issues for some users.

Specifically, creating lots of ObjectMappers that have not been created using shared JsonFactory instances will likely lead to much worse perf with creating byte and char arrays in Jackson. Jackson 2.16 and before used a buffer recycler based on ThreadLocal whose lifecycle was scoped just to the thread as opposed to the new approach where the buffer recycler lifecycle is scoped to the JsonFactory. If you don't use the same JsonFactory when creating ObjectMappers, then you will get new buffer-recycler instances for every instance of ObjectMapper.

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

No branches or pull requests

1 participant