ws-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Hudson (Commented) (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (AXIOM-103) Performance: Control string interning of OMStAXWrapper.getNamespaceURI()...Default should be no
Date Sat, 25 Feb 2012 13:13:48 GMT

    [ https://issues.apache.org/jira/browse/AXIOM-103?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13216434#comment-13216434
] 

Hudson commented on AXIOM-103:
------------------------------

Integrated in ws-axiom-trunk #799 (See [https://builds.apache.org/job/ws-axiom-trunk/799/])
    Removed the change introduced by AXIOM-103.

Rationale:
* The setNamespaceURIInterning API in OMStAXWrapper is not accessible to application code
because getXMLStreamReader is not guaranteed to return a direct reference to OMStAXWrapper
and the setNamespaceURIInterning is not defined by OMXMLStreamReader.
* The implementation is incomplete/inconsistent because only the return value of a single
method is interned, while the return values of other methods that return namespace URIs are
not interned.
* r1293589 introduces a well-defined public API that implements namespace URI interning consistently.
(Revision 1293593)

     Result = SUCCESS
veithen : 
Files : 
* /webservices/commons/trunk/modules/axiom/modules/axiom-common-impl/src/main/java/org/apache/axiom/om/impl/common/OMStAXWrapper.java
* /webservices/commons/trunk/modules/axiom/modules/axiom-common-impl/src/main/java/org/apache/axiom/om/impl/common/SwitchingWrapper.java

                
> Performance: Control string interning of OMStAXWrapper.getNamespaceURI()...Default should
be no
> -----------------------------------------------------------------------------------------------
>
>                 Key: AXIOM-103
>                 URL: https://issues.apache.org/jira/browse/AXIOM-103
>             Project: Axiom
>          Issue Type: Bug
>            Reporter: Rich Scheuerle
>            Assignee: Rich Scheuerle
>
> Problem:
> A recent change was made to OMStAXWrapper.getNamespaceURI() to always intern the returned
namespace uri string.  This cause an unnecessary lock on the String pool, which degrades 
> performance.  This change was added due to address the following issue: http://thread.gmane.org/gmane.text.xml.security.devel/5825.
  The solution below provides a way for the user to request
> interning.
> More Information:
> Most XMLStreamReader parsers have a flag to toggle String interning.  For performance
reasons, many of these parsers default to no interning.
> Thus the OMStAXWrapper should also default to no interning.
> The OMStAXWrapper is a wrapper around a parser or OM tree.  
> If the underlying parser has already interned the namespace, there is no reason to repeat
the interning.
> The problem is that there is no standard parser property to detect string interning.
 (Woodstox has a property on the XMLInputFactory.  IBM's parser has a property on the XMLStreamReader).
> Solution:
> I added isNamespaceURIInterning and setNamespaceURIInterning methods to OMStAXWrapper.
 This gives the user the control.  The default is reverted back to no interning.
> Future:
> This is a tactical solution.
> We might need to revisit this code if StAX provides public properties to control the
interning of namespace uris and strings.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@ws.apache.org
For additional commands, e-mail: dev-help@ws.apache.org


Mime
View raw message