xalan with pull parser 2007-03-16 - By keshlam@(protected)
> FWIW, last time I tried (maybe six months ago, maybe 1 or 2 versions of > Xerces ago), I found absolutely no performance advantage to performing a > transform from a SAX source over doing so from a stream source.
If you have something that can produce SAX events directly, using a SAXSource to accept that will be more efficient than converting from SAX to XML syntax and then parsing again. Similarly, if you already have a DOM, using a DOMSource is faster than doing that serialize-and-reparse cycle.
But if you're starting from a URI or other source of XML-syntax text, SAXSource and StreamSource are essentially the same datapath; both go through a SAX parser (I don't think we try to use XNI...?) into a DTM representation and are then processed from there. <html><body> <p>> FWIW, last time I tried (maybe six months ago, maybe 1 or 2 versions of <br> > Xerces ago), I found absolutely no performance advantage to performing a <br> > transform from a SAX source over doing so from a stream source.<br> <br> If you have something that can produce SAX events directly, using a SAXSource to accept that will be more efficient than converting from SAX to XML syntax and then parsing again. Similarly, if you already have a DOM, using a DOMSource is faster than doing that serialize-and-reparse cycle.<br> <br> But if you're starting from a URI or other source of XML-syntax text, SAXSource and StreamSource are essentially the same datapath; both go through a SAX parser (I don't think we try to use XNI...?) into a DTM representation and are then processed from there.</body></html>
|
|