[prev in list] [next in list] [prev in thread] [next in thread] 

List:       xerces-j-dev
Subject:    Re: Slow SAX parse when using schema validation?
From:       Elena Litani <elitani () ca ! ibm ! com>
Date:       2004-12-20 15:43:57
Message-ID: OF47EDB694.200261F5-ON85256F70.00548EA4-85256F70.00566B4A () ca ! ibm ! com
[Download RAW message or body]

--=_alternative 00566B4685256F70_=
Content-Type: text/plain; charset="US-ASCII"

Hi Curtiss,

> Curtiss Howard wrote:
> > For a small file, SAX only had a 20% performance advantage over DOM. 
> > I'd expected much more.

By default Xerces uses deferred DOM implementation so if you don't attempt 
to access any information from the DOM tree, you are pretty much only 
testing the "parsing" part of the implementation. If you try to access 
tree, you'll see that the deferred implementation is more efficient than 
Xerces DOM implementation for larger XML documents and less efficient for 
smaller ones. It does not look right though that for large documents 
difference between SAX and DOM is less than 20%.

You might find this article interesting:
http://www-106.ibm.com/developerworks/xml/library/x-injava/

For more info on Xerces performance:
http://www-106.ibm.com/developerworks/xml/library/x-perfap2.html

Thank you,
-- 
Elena Litani / IBM Toronto

--=_alternative 00566B4685256F70_=
Content-Type: text/html; charset="US-ASCII"


<br><font size=2><tt>Hi Curtiss,</tt></font>
<br>
<br><font size=2><tt>&gt; Curtiss Howard wrote:<br>
&gt; &gt; For a small file, SAX only had a 20% performance advantage over
DOM. <br>
&gt; &gt; I'd expected much more.</tt></font>
<br>
<br><font size=2><tt>By default Xerces uses deferred DOM implementation
so if you don't attempt to access any information from the DOM tree, you
are pretty much only testing the &quot;parsing&quot; part of the implementation.
If you try to access tree, you'll see that the deferred implementation
is more efficient than Xerces DOM implementation for larger XML documents
and less efficient for smaller ones. It does not look right though that
for large documents difference between SAX and DOM is less than 20%.</tt></font>
<br>
<br><font size=2><tt>You might find this article interesting:</tt></font>
<br><font size=2><tt>http://www-106.ibm.com/developerworks/xml/library/x-injava/</tt></font>
<br>
<br><font size=2><tt>For more info on Xerces performance:</tt></font>
<br><font size=2><tt>http://www-106.ibm.com/developerworks/xml/library/x-perfap2.html<br>
</tt></font>
<br><font size=2 face="sans-serif">Thank you,<br>
-- <br>
Elena Litani / IBM Toronto<br>
</font>
--=_alternative 00566B4685256F70_=--
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic