Uploaded image for project: 'RESTEasy'
  1. RESTEasy
  2. RESTEASY-1923

JsonWriterFactory and JsonReaderFactory re-created per request

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: Critical Critical
    • 3.6.0.Final, 4.0.0.Beta4
    • 4.0.0.Beta2, 3.5.0.Final
    • jaxrs
    • None

      I have been running a rest distributed microservice rest benchmark and have seen that on every request in our use case org.jboss.resteasy.plugins.providers.jsonp.AbstractJsonpProvider.findWriter() makes a call to Json.createWriterFactory(null). This is a very expensive call being passed through to the Classloader.

      In our test case we observe this call stack consuming 18.65% of cpu time.

      As the WriterFactory (and ReadFactory) are created with a null configuration, they are targets for caching and should reduce the cpu utilization in our test case by 18.65%.

        1. createWriterWriterFactory_cachedFactory.jpg
          592 kB
          John O'Hara
        2. createWriterWriterFactory.jpg
          735 kB
          John O'Hara

              rhn-support-asoldano Alessio Soldano
              johara@redhat.com John O'Hara
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

                Created:
                Updated:
                Resolved: