You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commons-dev@ws.apache.org by "Rich Scheuerle (JIRA)" <ji...@apache.org> on 2007/11/15 13:40:43 UTC

[jira] Created: (WSCOMMONS-280) Performacne: Control string interning of OMStAXWrapper.getNamespaceURI()...Default should be no

Performacne: Control string interning of OMStAXWrapper.getNamespaceURI()...Default should be no
-----------------------------------------------------------------------------------------------

                 Key: WSCOMMONS-280
                 URL: https://issues.apache.org/jira/browse/WSCOMMONS-280
             Project: WS-Commons
          Issue Type: Bug
          Components: AXIOM
            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.
-
You can reply to this email to add a comment to the issue online.


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


[jira] Updated: (WSCOMMONS-280) Performance: Control string interning of OMStAXWrapper.getNamespaceURI()...Default should be no

Posted by "Rich Scheuerle (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/WSCOMMONS-280?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Rich Scheuerle updated WSCOMMONS-280:
-------------------------------------

    Summary: Performance: Control string interning of OMStAXWrapper.getNamespaceURI()...Default should be no  (was: Performacne: Control string interning of OMStAXWrapper.getNamespaceURI()...Default should be no)

> Performance: Control string interning of OMStAXWrapper.getNamespaceURI()...Default should be no
> -----------------------------------------------------------------------------------------------
>
>                 Key: WSCOMMONS-280
>                 URL: https://issues.apache.org/jira/browse/WSCOMMONS-280
>             Project: WS-Commons
>          Issue Type: Bug
>          Components: AXIOM
>            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.
-
You can reply to this email to add a comment to the issue online.


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


[jira] Resolved: (WSCOMMONS-280) Performance: Control string interning of OMStAXWrapper.getNamespaceURI()...Default should be no

Posted by "Rich Scheuerle (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/WSCOMMONS-280?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Rich Scheuerle resolved WSCOMMONS-280.
--------------------------------------

    Resolution: Fixed

Committed Revision 595292

> Performance: Control string interning of OMStAXWrapper.getNamespaceURI()...Default should be no
> -----------------------------------------------------------------------------------------------
>
>                 Key: WSCOMMONS-280
>                 URL: https://issues.apache.org/jira/browse/WSCOMMONS-280
>             Project: WS-Commons
>          Issue Type: Bug
>          Components: AXIOM
>            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.
-
You can reply to this email to add a comment to the issue online.


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


[jira] Closed: (WSCOMMONS-280) Performance: Control string interning of OMStAXWrapper.getNamespaceURI()...Default should be no

Posted by "Rich Scheuerle (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/WSCOMMONS-280?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Rich Scheuerle closed WSCOMMONS-280.
------------------------------------

    Resolution: Fixed

Committed in 603081.
Incorrectly associated the fix with WSCOMMONS-282.

> Performance: Control string interning of OMStAXWrapper.getNamespaceURI()...Default should be no
> -----------------------------------------------------------------------------------------------
>
>                 Key: WSCOMMONS-280
>                 URL: https://issues.apache.org/jira/browse/WSCOMMONS-280
>             Project: WS-Commons
>          Issue Type: Bug
>          Components: AXIOM
>            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.
-
You can reply to this email to add a comment to the issue online.


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


[jira] Reopened: (WSCOMMONS-280) Performance: Control string interning of OMStAXWrapper.getNamespaceURI()...Default should be no

Posted by "Rich Scheuerle (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/WSCOMMONS-280?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Rich Scheuerle reopened WSCOMMONS-280:
--------------------------------------


Reopened to fix similar problem in OMStAXBuilder.  I will commit the code after I complete testing.

> Performance: Control string interning of OMStAXWrapper.getNamespaceURI()...Default should be no
> -----------------------------------------------------------------------------------------------
>
>                 Key: WSCOMMONS-280
>                 URL: https://issues.apache.org/jira/browse/WSCOMMONS-280
>             Project: WS-Commons
>          Issue Type: Bug
>          Components: AXIOM
>            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.
-
You can reply to this email to add a comment to the issue online.


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