Skip to content

possible perf issues if you upgrade to Jackson 2.17 #998

@pjfanning

Description

@pjfanning

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions