cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Donald Ball <ba...@webslingerZ.com>
Subject Re: Cocoon 2.0: proposed battleplan
Date Sat, 15 Apr 2000 17:21:15 GMT
On Sat, 15 Apr 2000, Robin Green wrote:

> Donald Ball <balld@webslingerZ.com> wrote:
> >On Fri, 14 Apr 2000, Pier P. Fumagalli wrote:
> >
> > > Because, doing it before, or doing it after, it's the same thing....
> > > We won't loose that much performance on that, and it surely eases the
> > > whole architecture (having only one way to pass XML from one place to
> > > another!)
> >
> >But doing it before, the XML parser gets to do it internally. Doing it
> >after, we have to construct the DOM from SAX events. I reckon the former
> >would be faster... should I do some tests?
> 
> Um, how could it be?? This is how an XML parser works, surely:
> 
> A parser HAS to build a DOM tree out of SAX events (or something equivalent 
> to SAX events) - they just represent the parser saying "Encountered X", 
> "Encountered Y", etc. etc. How could it be done any more efficiently? Apart 
> from little things like "make all DocumentHandler methods final", it 
> couldn't!

Well, offhand, I'd say the parser creating a DOM directly would not need
to bother constructing events (expensive unless they're pooling them) and
slinging them around, but just manipulate the DOM directly. The savings
are probably miniscule at best, though, and certainly not worth the debate
- I'll just use the SAX->DOM utilities Pier wrote and hope they work as
advertised. :)

- donald


Mime
View raw message