You are viewing a plain text version of this content. The canonical link for it is here.
Posted to j-users@xerces.apache.org by Shital Joshi <sh...@mfgsys.com> on 2003/07/14 00:53:37 UTC

SAX Parsing too slow

Hi there,

I am parsing a very big xml document(1.2 gb) using Xerces SAX Parser. It
takes more than 15 minutes before it actually starts thorwing start element
and end element events. Since this is not a DOM Parser, I suspect it doesn't
load the document in memory and all. Then nwhy does it take so long before
throwing any events? Is there any way to make it faster?

Any help is appreciated.
Thanks,
-Shital Joshi
MFG Systems




---------------------------------------------------------------------
To unsubscribe, e-mail: xerces-j-user-unsubscribe@xml.apache.org
For additional commands, e-mail: xerces-j-user-help@xml.apache.org


Re: SAX Parsing too slow

Posted by Elliotte Rusty Harold <el...@metalab.unc.edu>.
At 6:53 PM -0400 7/13/03, Shital Joshi wrote:
>Hi there,
>
>I am parsing a very big xml document(1.2 gb) using Xerces SAX Parser. It
>takes more than 15 minutes before it actually starts thorwing start element
>and end element events. Since this is not a DOM Parser, I suspect it doesn't
>load the document in memory and all. Then nwhy does it take so long before
>throwing any events? Is there any way to make it faster?
>

There could be any number of reasons, but since you're wisely using 
AX the simplest solution is try other parsers such as Crimson and 
Piccolo and see if any of them provide better performance on your 
documents. If they're all equally slow the problem is probably in 
your code. For instance, how do you know it takes 15 minutes before 
it  starts firing start element and end element events?  Isd it 
possible it actually starts much sooner but your output gets buffered 
until then?
-- 

   Elliotte Rusty Harold
   elharo@metalab.unc.edu
   Processing XML with Java (Addison-Wesley, 2002)
   http://www.cafeconleche.org/books/xmljava
   http://www.amazon.com/exec/obidos/ISBN%3D0201771861/cafeaulaitA

---------------------------------------------------------------------
To unsubscribe, e-mail: xerces-j-user-unsubscribe@xml.apache.org
For additional commands, e-mail: xerces-j-user-help@xml.apache.org