Uploaded image for project: 'CXF'
  1. CXF
  2. CXF-8028

Performance problem with very big request

Agile BoardAttach filesAttach ScreenshotVotersWatch issueWatchersCreate sub-taskLinkCloneUpdate Comment AuthorReplace String in CommentUpdate Comment VisibilityDelete Comments
    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Critical
    • Resolution: Fixed
    • Affects Version/s: 3.3.0
    • Fix Version/s: 3.2.9, 3.3.2
    • Component/s: Core, JAX-WS Runtime
    • Labels:
      None
    • Estimated Complexity:
      Unknown

      Description

      I am using CXF as webservice client for years and since the migration of my application from Java 8 to Java 11 I have noticed a performance degradation on very big request

      after digging in the code I found following methods in DOMUtils.java

      /**
       * Try to get the DOM Node from the SAAJ Node with JAVA9 afterwards
       * @param node The original node we need check
       * @return The DOM node
       */
      public static Node getDomElement(Node node) {
          if (node != null && isJava9SAAJ()) {
              //java9plus hack
              try {
                  Method method = node.getClass().getMethod("getDomElement");
                  node = (Node)method.invoke(node);
              } catch (NoSuchMethodException e) {
                  //best effort to try, do nothing if NoSuchMethodException
              } catch (Exception e) {
                  throw new RuntimeException(e);
              }
          }
          return node;
      }
      

      CXF-7270 + CXF-7683 + CXF-7741 + CXF-7847

      when getDomelement() method doesn't exist on the Node, an exception of type NoSuchMethodException is created which normally takes 1 milliseconds (mainly used to fill the stacktrace)
      (similar problem for getDomDocumentFragment() method)

      but if the document is really big and contains more than 30'000 elements, the repetitive creation of this exception could cost a some seconds ...

      I have fixed this performance by caching node without getDomElement() method to avoid repetitive exception but I am not sure if it's a good solution

      can you help me with this performance problem?

        Attachments

          Activity

            People

            • Assignee:
              dkulp Daniel Kulp
              Reporter:
              gilles.diacon Gilles Diacon

              Dates

              • Created:
                Updated:
                Resolved:

              Time Tracking

              Estimated:
              Original Estimate - Not Specified
              Not Specified
              Remaining:
              Remaining Estimate - 0h
              0h
              Logged:
              Time Spent - 20m
              20m

                Issue deployment