If reflection were not used, we would have a dependency on a later
version of JAXP, which would require many users to upgrade their XML
parser.  In particular, most users seem to use Xerces 1.x.  The only
JAXP classes provided by it are

    javax/xml/parsers/DocumentBuilder.class
    javax/xml/parsers/DocumentBuilderFactory.class
    javax/xml/parsers/FactoryConfigurationError.class
    javax/xml/parsers/ParserConfigurationException.class
    javax/xml/parsers/SAXParser.class
    javax/xml/parsers/SAXParserFactory.class

As for reflection and performance, it may make a difference when
handling very small payloads.  When I added this patch, however, I
inserted code to measure the time spent in each call.  Basically, all
the time is spent in javax.xml.transform.Transformer#transform, e.g. if
it takes 5 seconds to parse the payload, that method takes 4.99 seconds.
The cost of reflection is miniscule compared to parsing that requires
seconds or minutes.

Scott Nichol

----- Original Message -----
From: "Pavel Ausianik" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Thursday, October 17, 2002 11:00 AM
Subject: RE: SAXParser ?


Scott,

I'm not going to discuss the perfomance changes by switching to SAX
parsing
with producing DOMResult - just don't know if it could be, but I'm
interesting what is the primary reason for using reflection API and
Class.forName, instead of using classes directly  - this actually could
be
performance issue itself.

Best regards,
Pavel

> -----Original Message-----
> From: Scott Nichol [mailto:snicholnews@;scottnichol.com]
> Sent: Thursday, October 17, 2002 5:19 PM
> To: [EMAIL PROTECTED]
> Subject: Re: SAXParser ?
>
>
> In short, I would love to have a speedier, SAX-based Apache
> SOAP, but I
> don't know where the effort would come from to do the work.
>
> I don't know of any time that any developer(s) said Apache
> SOAP would be
> moving to using SAX, and I know of no plans to do so.  A significant
> part of very early Axis development was refactoring everything to be
> driven by SAX.  I doubt we have the cycles here to repeat that effort
> (although volunteers are always welcome!).  As it stands, I
> only expect
> some of the smallest items on the TODO list to be addressed because of
> the lack of developers.  (Note that I would like to package
> the current
> code as a release and cannot even get a more experience contributor to
> help me through the steps of doing that!).
>
> There is an option in the current code, based on a contribution
> (http://marc.theaimsgroup.com/?l=soap-dev&m=102571700230501&w=2), that
> allows you to specify whether you want messages parsed by a DOM parser
> or by a SAX parser with a transform to a DOM result.  The contributor
> reported significant speed improvement, although the few tests I have
> run have not corroborated this.
>
> Scott Nichol
>
> ----- Original Message -----
> From: "Leif Nilsson TACMa" <[EMAIL PROTECTED]>
> To: <[EMAIL PROTECTED]>
> Sent: Thursday, October 17, 2002 6:49 AM
> Subject: SAXParser ?
>
>
> There has been discussions about using a SAX parser instead of a DOM
> parser.
> What is the status on this ?
>
> Quoting Axis:
> Speed. Axis uses SAX (event-based) parsing to acheive significantly
> greater
> speed than earlier versions of Apache SOAP.
>
> /Leif Nilsson
>
>
> Leif Nilsson
> Software Engineer
>
> TAC AB
> Jägershillgatan 18
> SE-213 75 Malmö, Sweden
> Direct +46 40 38 69 56
> Fax +46 40 21 82 87
> Mobile +46 46 299 89 56
> www.tac-global.com
>
> This email is intended only for the use of the individual or entity to
> whom
> it is addressed. It may contain information that is privileged,
> confidential
> or otherwise protected from disclosure under applicable law.
> If you have
> received this transmission in error, please delete it immediately and
> notify
> me by mailing me.
>
>
>
> --
> To unsubscribe, e-mail:   <mailto:soap-dev-unsubscribe@;xml.apache.org>
> For additional commands, e-mail: <mailto:soap-dev-help@;xml.apache.org>
>
>
>
>
> --
> To unsubscribe, e-mail:   <mailto:soap-dev-unsubscribe@;xml.apache.org>
> For additional commands, e-mail: <mailto:soap-dev-help@;xml.apache.org>
>

--
To unsubscribe, e-mail:   <mailto:soap-dev-unsubscribe@;xml.apache.org>
For additional commands, e-mail: <mailto:soap-dev-help@;xml.apache.org>




--
To unsubscribe, e-mail:   <mailto:soap-dev-unsubscribe@;xml.apache.org>
For additional commands, e-mail: <mailto:soap-dev-help@;xml.apache.org>

Reply via email to