Keith,

I tried the change you suggested. Firstly I noticed that we must call
unmarshaller.createHandler() in order to get a reference to the Handler.
Would it be benefitial to have the Handler cacheable as well ?

Anyway even with this point, the changed code (using our own XMLReader
rather than patching Castor) is only about 2% slower so it would be better
to go with this for the moment. I would think though that if an API existed
to pass in our own XMLReader at the unmarshall stage, i.e.
unmarshall(XMLReader,InputSource) then the code would be much cleaner and
there wouldn't be any threading issues to worry about on the castor side.
What do you reckon about that ?

By the way with a little bit of tweeking (usually involving cacheing stuff
for reuse) we have SOAP performing 2.5 times slower than CORBA and 4 times
slower than a 2Tier implementation of the same service which isn't two bad
considering everything.

Thanks,

Brian

-----Original Message-----
From: Keith Visco [mailto:[EMAIL PROTECTED]
Sent: 28 November 2003 06:37
To: [EMAIL PROTECTED]
Subject: Re: [castor-dev] Unmarshalling - performance large XML extracts




Hi Brian,

"Brian Dillon (ext. 944)" wrote:
> 
> Keith,
> 
> The threading issue, isn't really a problem since there is effectively one
> Unmarshaller created per SOAP request and there is also only one thread
per
> SOAP request. 

I'm more concerned if the caching of the XMLReader will cause threading
problems for other castor users.

> However there may be several calls to Unmarshall per single
> request and this is where the gain can be got. I have tested the fix using
a
> multithreaded SOAP client to make multiple request and everything was
fine.
> 

understood...

> I can't see how getting the UnmarshllerHandler from the Unmarshaller would
> help me. 

Because UnmarshalHandler implements ContentHandler...

> The Handler is set on the XMLReader not the other way around so I
> don't see a way of overrinding the XMLReader in the Unmarshaller.

You don't....but you can do something like this:

UnmarshalHandler handler = myUnmarshaller.getUnmarshalHandler();
myXMLReader.setContentHandler(handler);
myXMLReader.parse(source);
Object ojb = handler.getObject();

So you can cache your own XMLReader, you don't need to modify the castor
code to get your performance gain.


> Maybe that would be and Idea for future API changes ?

My above example is already supported.

> 
> p.s. I will keep you updated with any other performance improvements I
find
> and what the end result in the comparison with CORBA turns out to be.

Yes, please do, we're always interested in finding ways to improve
performance of the default configuration or providing the information on
how to tweak/configure Castor to improve performance.

Thanks,

--Keith

----------------------------------------------------------- 
If you wish to unsubscribe from this mailing, send mail to
[EMAIL PROTECTED] with a subject of:
        unsubscribe castor-dev


**********************************************************************
The information contained in this e-mail is confidential, may be privileged and is 
intended only for the user of the recipient named above.  If you are not the intended 
recipient or a representative of the intended recipient, you have received this e-mail 
in error and must not copy, use or disclose the contents of this e-mail to anybody 
else.  If you have received this e-mail in error, please notify the sender immediately 
by return e-mail and permanently delete the copy you received.  This e-mail has been 
swept for computer viruses.  However, you should carry out your own virus checks. 
Registered in Ireland, No. 205721.  http://www.FINEOS.com
**********************************************************************

----------------------------------------------------------- 
If you wish to unsubscribe from this mailing, send mail to
[EMAIL PROTECTED] with a subject of:
        unsubscribe castor-dev

Reply via email to