[ 
https://issues.apache.org/jira/browse/WSCOMMONS-325?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12590984#action_12590984
 ] 

Rich Scheuerle commented on WSCOMMONS-325:
------------------------------------------

In both places, the isSetPrefixBeforeStartElement method is called by a method 
that does not have the ability to save the setting.  So the best that we could 
do (without a major rewrite) is to cache the setting for a specific writer.

Are you sure that the performance impact is due to the looking for the 
property, or is it do to the subsequent serialization.

Thanks,
Rich

> org.apache.axiom.om.impl.util.OMSerializerUtil.isSetPrefixBeforeStartElement()
>  doing property lookup on every invocation - performance problem
> ----------------------------------------------------------------------------------------------------------------------------------------------
>
>                 Key: WSCOMMONS-325
>                 URL: https://issues.apache.org/jira/browse/WSCOMMONS-325
>             Project: WS-Commons
>          Issue Type: Bug
>          Components: AXIOM
>            Reporter: Tim Mitchell
>            Assignee: Rich Scheuerle
>
> org.apache.axiom.om.impl.util.OMSerializerUtil.isSetPrefixBeforeStartElement()
>  has code that checks for the property 
> javax.xml.stream.XMLStreamWriter.isSetPrefixBeforeStartElement on the 
> XMLStreamWriter property that is passed in to the method. We have run tests 
> that run through this code path and have noticed performance issues due to 
> the method checking the property on every method invocation.
> Is there anyway that the value could be cached rather than doing the lookup 
> each time ? And similarly, if the property isn't found, could the 
> writer.getNamespaceContext() result be cached so that we just do the check 
> once ?

-- 
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