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 Nirmal Mukhi <nm...@us.ibm.com> on 2002/10/07 16:21:15 UTC

[WSIF] Improving performance of WSIF stub invocation




Hello,

I've been doing a bit of work on improving WSIF performance, right now I'm
concentrating on improvements to the dynamic proxy (this is
provider-independent code and thus affects all stub invocations).

I noticed that in the code reuse of WSIFOperation objects for multiple
invocations is prevented - providers call the close() method after an
invocation is complete that tags the operation as having been used; this
flag is checked prior to a use. I don't see why this should be done.
WSIFOperation objects should not hold any state specific to a single
invocation, so why is reuse bad? Reusing operations results in a big
performance improvement, since creating them is somewhat expensive.  As a
test, I disabled the "closed" flag and cached WSIF operation objects
created by the dynamic proxy, and things worked great. Anybody have any
reason I should not do that? The right way to fix this of course would be
to eliminate the existence of the close method completely (but this would
require minor changes in all providers).

I also added caching of WSDL operations (so java method calls via the stub
interface don't have to be mapped to the WSDL operation each time) and
caching of messages used during invocations (it's safe to do this since we
overwrite all message parts before invocation) in the dynamic proxy. These
changes are fairly straightforward.

Altogether the stub invocation became approximately 5 - 9 times faster than
before for a large number of invocations. I'll commit my changes in a
couple of days if nobody has objections.

Thanks,
Nirmal.