[ 
https://issues.apache.org/jira/browse/WSCOMMONS-294?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Andreas Veithen updated WSCOMMONS-294:
--------------------------------------

    Attachment: wscommons-294.patch.txt

Attached a patch that optimizes the getText method to use a StringBuffer to do 
concatenation when there are more than one text nodes found.

> Inefficient string concatenation in OMElementImpl#getText
> ---------------------------------------------------------
>
>                 Key: WSCOMMONS-294
>                 URL: https://issues.apache.org/jira/browse/WSCOMMONS-294
>             Project: WS-Commons
>          Issue Type: Bug
>          Components: AXIOM
>            Reporter: Andreas Veithen
>         Attachments: Test.java, wscommons-294.patch.txt
>
>
> The getText method in org.apache.axiom.om.impl.llom.OMElementImpl uses the 
> plus operator to do repetitive string concatenations. This leads to rapid 
> performance degradation when the element contains a large number of text 
> nodes. This may happen in particular when the XMLStreamReader is not 
> coalescing. I believe that this is the root cause of the problem described in 
> the following thread:
> http://www.nabble.com/Process-SOAP-message-containg-XHTML-to14804315.html

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to