1. glassfish
  2. GLASSFISH-15559

[PERF]: JAXB string interning introduces major performance regression for webservices


    • Type: Bug Bug
    • Status: Closed
    • Priority: Blocker Blocker
    • Resolution: Fixed
    • Affects Version/s: 3.1_b31
    • Fix Version/s: 3.1
    • Component/s: jax-rs
    • Labels:


      The upgrade to jaxb 2.2.2 in build 31 has caused a significant regression in webservices performance. [The underlying issue is in jaxb, which isn't a category, so I'm using jax-rs; not sure if that is the most appropriate.]

      The root cause is the new string.intern() calls performed by FastInfosetConnector.InterningXmlVisitor. If I take the 2.2.1 FastInfosetConnector class and run it in 2.2.2, the regression goes away (the only difference in that class is the 2.2.2 classes uses a new InterningXmlVisitor(visitor) object; the 2.2.1 class uses the passed-in visitor directly). Running that test is what I referred to below when I said I needed to gather a little more data first.

      I realize that may affect other parts of the code, but these intern calls are clearly a problem. In specj, we are spending 10% of our time just doing string intern calls, and the webservices calls in specj (which is what uses jaxb) are a very minor part of the workload. The actual webservice call – that is – takes 3x longer with jaxb 2.2.2, and the jaxb unmarshalling (com.sun.xml.bin.api.Bridge.unmarshal -> com.sun.xml.bind.v2.runtime.unmarshaller.FastInfosetConnector.bridge()) takes 7x longer. All that time is from the string interning.

        Issue Links


          Martin Grebac added a comment -

          The updated jaxb release 2.2.3-1 was integrated to GF 3.1.

          Martin Grebac added a comment - The updated jaxb release 2.2.3-1 was integrated to GF 3.1.


            • Assignee:
              Pavel Bucek
              Scott Oaks
            • Votes:
              0 Vote for this issue
              0 Start watching this issue


              • Created: