logo       

Related Msgs: audio.musicbrai...    enbd.general/20...    ietf.idr/2002-0...    java.ant-contri...    gnu.make.genera...    qplus.devel/200...    video.freevo.cv...    os.netbsd.ports...    yellowdog.gener...    xfree86.cvs/200...    search.nutch.us...    freedesktop.xse...    programming.swi...    capabilities.ge...    telephony.pbx.a...    mail.sylpheed.c...    db.firebase.por...    boot-loaders.u-...    recreation.radi...    netbsd.bugs/200...    web.zope.plone....    user-groups.lin...   

Re: Slow SAX parse when using schema validation?: msg#00077

Subject: Re: Slow SAX parse when using schema validation?
That's not at all how the deferred DOM implementation works. No part of 
the document is skipped. Deferred DOM defers creation of nodes [1], only 
building them as the tree is traversed. The scanner which sits at the 
front of the pipeline parses the document and if the document isn't 
well-formed it'll report that.

[1] http://xml.apache.org/xerces2-j/features.html#dom.defer-node-expansion

Elliotte Harold <elharo@xxxxxxxxxxxxxxx> wrote on 12/19/2004 05:58:56 AM:

> Curtiss Howard wrote:
> 
> 
> > For a small file, SAX only had a 20% performance advantage over DOM. 
> > I'd expected much more.  Surprisingly enough, as I increased the size
> > of the file being parsed, the performance advantage _narrowed_, not
> > widened, as I'd expected.  Obviously the parse is going to be somewhat
> > slow due to schema validation, but I'm confused as to why SAX is
> > performing so poorly compared to DOM.  Can anyone shed some light on
> > this?
> 
> Is it possible you're using the deferred DOM implementation? If so, 
> Xerces DOM parser is not actually parsing part of the file until you 
> actually walk the tree. That would explain why it seems to speed up with 

> larger documents: more to skip. Personally I think this behavior is 
> nonconformant to the XML and DOM specifications--it fails to detect 
> well-formedness errors as early as required--but others disagree with 
me.
> 
> -- 
> Elliotte Rusty Harold  elharo@xxxxxxxxxxxxxxx
> XML in a Nutshell 3rd Edition Just Published!
> http://www.cafeconleche.org/books/xian3/
> http://www.amazon.com/exec/obidos/ISBN=0596007647/cafeaulaitA/ref=nosim
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: xerces-j-user-unsubscribe@xxxxxxxxxxxxxx
> For additional commands, e-mail: xerces-j-user-help@xxxxxxxxxxxxxx
> 

Michael Glavassevich
XML Parser Development
IBM Toronto Lab
E-mail: mrglavas@xxxxxxxxxx
E-mail: mrglavas@xxxxxxxxxx



Try Searching:
servers, voip, java, networking, microsoft ...
<Prev in Thread] Current Thread [Next in Thread>
Google Custom Search

Home | blog view | USPTO Patent Archive | advertise | OSDir is an inevitable website. super tiny logo