axis-java-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Sam Ruby" <>
Subject Re: Threading
Date Mon, 30 Apr 2001 14:57:18 GMT
Glen Daniels wrote:
> > I just added a new SOAPSAXHandler child called SAXAdapter, which simply
> > parses the entire message when parse() is called, with no threads.  To try
> > it out, just replace the "ThreadedSAXAdapter" in with
> > "SAXAdapter".
> >
> > I didn't do any serious testing, but it looks like the timings improved > from
> > ~55msg/sec with the ThreadedSAXAdapter to ~70msg/sec with the non-threaded
> > version.  More tomorrow...

I didn't see as dramatic of gains as you did, but personally, I see no
further need for the threaded version.  I'd also recommend that we go from
a combination state machine (like you do for the envelope and body) /
pushdown stack of sax handlers (recorders/deserializers) to a simply a
pushdown stack.

> > What does it do with the events?
> It parses them into a SOAPEnvelope, with (by default) an RPC-style body.
> We don't really want to be doing this, for a couple of reasons:
> * It causes the entire message to be read into memory.
> * We may not be able to determine the desired message format
> plus available type mappings) until we've run through the header handlers
> and parse the body to do a lookup/dispatch

Yes, right now, everything is parsed into a message and then passed around.

If instead, it were parsed directly into the handler (think of RPCElement
and RPCParam as subordinant to RPCDispatchHandler instead of Message), then
the handler could decide how much to hang onto and how much to simply pass

In general, data may need to be stashed away in anticipation of multiple
passes being required.  In practice, later passes may often be optimized

> The plan, I think, is to move to pull-style incremental parsing, but
> a next step after we integrate Xerces-2, or XPP....

The current code base works just fine with Xerces-2.  Doesn't exploit XNI,
but it looks to me like there are plenty of other inefficiencies to address
first.  Time for some profiling...

- Sam Ruby

View raw message