Skip to content

Objectmapper instance should not be created per api client invocation. #11686

@XI1998-swapnilmarathe

Description

@XI1998-swapnilmarathe

Objectmappers are heavy according to what I have read. Instead it is encouraged to use ObjectReader and ObjectWriter as lightweight alternatives.

For now, we suggest to create new APIClient per thread as its not thread safe. This will also result in creation of new object mapper per invocation.

ref:

image

image

For some cases, objectmapper is not configurable, for that we can allow setting mapper in apiclient via setters.

Can we add this improvement in future?

Metadata

Metadata

Assignees

No one assigned

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions