Uploaded image for project: 'camunda BPM'
  1. camunda BPM
  2. CAM-9008

Usage of ObjectMapper#canSerialize() in JSON data format causes performance issues

    XMLWordPrintable

    Details

      Description

      To verify that an object can be serialied the function ObjectMapper#canSerialize() is called. The internal implementation of this function synchronizes on an internal cache object etc. That causes in high load scenarios some performance issues.

      They (i.e. Jackson) does not recommend to use that function, because it is not easy to figure out reliably whether value of given type can be handled. They even are going to remove the function in one of the next releases [2].

      AT:

      • remove the function call ObjectMapper#canSerialize()

      [1]: https://github.com/camunda/camunda-spin/blob/1581a3253b5dc511d60a384028808d1ed3087fad/dataformat-json-jackson/src/main/java/org/camunda/spin/impl/json/jackson/format/JacksonJsonDataFormatMapper.java#L38
      [2]: https://github.com/FasterXML/jackson-databind/issues/1917

        Attachments

          Activity

            People

            Assignee:
            roman.smirnov Roman Smirnov
            Reporter:
            roman.smirnov Roman Smirnov
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved: