You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-dev@axis.apache.org by "Rich Scheuerle (JIRA)" <ji...@apache.org> on 2008/01/03 16:05:33 UTC

[jira] Created: (AXIS2-3422) Eliminate redundant lookup in MessageContext.getProperty(String)

Eliminate redundant lookup in MessageContext.getProperty(String)
----------------------------------------------------------------

                 Key: AXIS2-3422
                 URL: https://issues.apache.org/jira/browse/AXIS2-3422
             Project: Axis 2.0 (Axis2)
          Issue Type: Improvement
          Components: kernel
            Reporter: Rich Scheuerle
            Assignee: Rich Scheuerle


Background:
MessageContext.getProperty(String) is invoked frequently during the processing of a web service message.
MessageContext.getProperty(String) delegates to its super class (AbstractContext) to get the property value.  The AbstractContext is aware of parent/ancestor contexts and automatically
searches these objects.
If a value is not found, the MessageContext then looks in the OperationContext, ServiceContext, etc. 

Problem:
The secondary search of the OperationContext, ServiceContext, etc. is not necessary if these contexts are ancestors of the MessageContext.  
The secondary search is expensive and should be eliminated.

Solution:
Add a new method to AbstractContext, isAncestor(AbstractContext).
Use the new method in MessageContext to avoid the secondary search.

Kudos:
David Strite (IBM) found this secondary search problem while doing performance testing for small message payloads.  The new code should increase throughput by about 2% in these cases.

-- 
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: axis-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-dev-help@ws.apache.org


[jira] Commented: (AXIS2-3422) Eliminate redundant lookup in MessageContext.getProperty(String)

Posted by "Glen Daniels (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/AXIS2-3422?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12556177#action_12556177 ] 

Glen Daniels commented on AXIS2-3422:
-------------------------------------

Rich: is it even possible for OperationContext / ServiceContext / etc to NOT be "ancestors"?  I thought that setOperationContext() and the like automatically set up the parent pointers.  If that's true, we shouldn't need the explicit search code in MessageContext at all... and thus shouldn't need the "ancestor" stuff either.

Unless we have solid use cases for why a MessageContext would contain a pointer to another context that wasn't marked as a parent, I guess I'd prefer to explore getting rid of that code and just using AbstractContext's built-in search.

Thoughts?

> Eliminate redundant lookup in MessageContext.getProperty(String)
> ----------------------------------------------------------------
>
>                 Key: AXIS2-3422
>                 URL: https://issues.apache.org/jira/browse/AXIS2-3422
>             Project: Axis 2.0 (Axis2)
>          Issue Type: Improvement
>          Components: kernel
>            Reporter: Rich Scheuerle
>            Assignee: Rich Scheuerle
>
> Background:
> MessageContext.getProperty(String) is invoked frequently during the processing of a web service message.
> MessageContext.getProperty(String) delegates to its super class (AbstractContext) to get the property value.  The AbstractContext is aware of parent/ancestor contexts and automatically
> searches these objects.
> If a value is not found, the MessageContext then looks in the OperationContext, ServiceContext, etc. 
> Problem:
> The secondary search of the OperationContext, ServiceContext, etc. is not necessary if these contexts are ancestors of the MessageContext.  
> The secondary search is expensive and should be eliminated.
> Solution:
> Add a new method to AbstractContext, isAncestor(AbstractContext).
> Use the new method in MessageContext to avoid the secondary search.
> Kudos:
> David Strite (IBM) found this secondary search problem while doing performance testing for small message payloads.  The new code should increase throughput by about 2% in these cases.

-- 
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: axis-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-dev-help@ws.apache.org


[jira] Resolved: (AXIS2-3422) Eliminate redundant lookup in MessageContext.getProperty(String)

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

Rich Scheuerle resolved AXIS2-3422.
-----------------------------------

    Resolution: Fixed

Fixed 608527

> Eliminate redundant lookup in MessageContext.getProperty(String)
> ----------------------------------------------------------------
>
>                 Key: AXIS2-3422
>                 URL: https://issues.apache.org/jira/browse/AXIS2-3422
>             Project: Axis 2.0 (Axis2)
>          Issue Type: Improvement
>          Components: kernel
>            Reporter: Rich Scheuerle
>            Assignee: Rich Scheuerle
>
> Background:
> MessageContext.getProperty(String) is invoked frequently during the processing of a web service message.
> MessageContext.getProperty(String) delegates to its super class (AbstractContext) to get the property value.  The AbstractContext is aware of parent/ancestor contexts and automatically
> searches these objects.
> If a value is not found, the MessageContext then looks in the OperationContext, ServiceContext, etc. 
> Problem:
> The secondary search of the OperationContext, ServiceContext, etc. is not necessary if these contexts are ancestors of the MessageContext.  
> The secondary search is expensive and should be eliminated.
> Solution:
> Add a new method to AbstractContext, isAncestor(AbstractContext).
> Use the new method in MessageContext to avoid the secondary search.
> Kudos:
> David Strite (IBM) found this secondary search problem while doing performance testing for small message payloads.  The new code should increase throughput by about 2% in these cases.

-- 
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: axis-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-dev-help@ws.apache.org


[jira] Commented: (AXIS2-3422) Eliminate redundant lookup in MessageContext.getProperty(String)

Posted by "Rich Scheuerle (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/AXIS2-3422?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12556587#action_12556587 ] 

Rich Scheuerle commented on AXIS2-3422:
---------------------------------------

Glen,

According to the comments that I read, it seems that there might be a window where a MessageContext's properties are not hooked into the OperationContext.  I don't know if this is for legacy situations, persistent situations,  or if this situation exists anymore.

I agree that having two "parent" pointers is confusing and error prone.  I would be in favor of changing the code to only have one.  For example, the MessageContext should not have a separate instance variable that is the "OperationContext".  Instead it should always assume that the MessageContext's parent  (from the AbstractContext) is the OperationContext.

If you have a stong feeling about this, please open another JIRA.  I am willing to investigate.  

Thanks
Rich

> Eliminate redundant lookup in MessageContext.getProperty(String)
> ----------------------------------------------------------------
>
>                 Key: AXIS2-3422
>                 URL: https://issues.apache.org/jira/browse/AXIS2-3422
>             Project: Axis 2.0 (Axis2)
>          Issue Type: Improvement
>          Components: kernel
>            Reporter: Rich Scheuerle
>            Assignee: Rich Scheuerle
>
> Background:
> MessageContext.getProperty(String) is invoked frequently during the processing of a web service message.
> MessageContext.getProperty(String) delegates to its super class (AbstractContext) to get the property value.  The AbstractContext is aware of parent/ancestor contexts and automatically
> searches these objects.
> If a value is not found, the MessageContext then looks in the OperationContext, ServiceContext, etc. 
> Problem:
> The secondary search of the OperationContext, ServiceContext, etc. is not necessary if these contexts are ancestors of the MessageContext.  
> The secondary search is expensive and should be eliminated.
> Solution:
> Add a new method to AbstractContext, isAncestor(AbstractContext).
> Use the new method in MessageContext to avoid the secondary search.
> Kudos:
> David Strite (IBM) found this secondary search problem while doing performance testing for small message payloads.  The new code should increase throughput by about 2% in these cases.

-- 
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: axis-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-dev-help@ws.apache.org