You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@cxf.apache.org by "ASF GitHub Bot (JIRA)" <ji...@apache.org> on 2019/04/29 07:14:00 UTC

[jira] [Work logged] (CXF-8028) Performance problem with very big request

     [ https://issues.apache.org/jira/browse/CXF-8028?focusedWorklogId=234340&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-234340 ]

ASF GitHub Bot logged work on CXF-8028:
---------------------------------------

                Author: ASF GitHub Bot
            Created on: 29/Apr/19 07:13
            Start Date: 29/Apr/19 07:13
    Worklog Time Spent: 10m 
      Work Description: gillesdiacon commented on pull request #550: CXF-8028: try to fix performance for very big document in DOMUtils
URL: https://github.com/apache/cxf/pull/550
 
 
   CXF-8028: try to fix performance for very big document in DOMUtils.getDomElement() and DOMUtils.getDomDocumentFragment()
 
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Issue Time Tracking
-------------------

            Worklog Id:     (was: 234340)
            Time Spent: 10m
    Remaining Estimate: 0h

> Performance problem with very big request 
> ------------------------------------------
>
>                 Key: CXF-8028
>                 URL: https://issues.apache.org/jira/browse/CXF-8028
>             Project: CXF
>          Issue Type: Bug
>          Components: Core, JAX-WS Runtime
>    Affects Versions: 3.3.0
>            Reporter: Gilles Diacon
>            Priority: Critical
>          Time Spent: 10m
>  Remaining Estimate: 0h
>
> 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}}
> {code: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;
> }
> {code}
> 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?



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)