Skip to Content.
Sympa Menu

xom-interest - Re: [XOM-interest] More parsing performance patches

xom-interest AT lists.ibiblio.org

Subject: XOM API for Processing XML with Java

List archive

Chronological Thread  
  • From: Elliotte Harold <elharo AT metalab.unc.edu>
  • To: Michael Kay <mike AT saxonica.com>
  • Cc: xom-interest AT lists.ibiblio.org
  • Subject: Re: [XOM-interest] More parsing performance patches
  • Date: Sat, 23 Jul 2005 07:58:55 -0400

Michael Kay wrote:
Another case to consider is where the events are coming from the output of
an XSLT transformation, where it's quite likely that each <xsl:value-of>
instruction or piece of literal text in the stylesheet will lead to a call
on characters().


Good point. XOM uses a completely different class (nu.xom.xslt.XSLTHandler) for such events, though, so none of the changes made where will have any effect on that, one way or the other. I did make the Vector-->ArrayList switch Wolfgang suggested in that class too. I have not changed its buffering behavior though.

Hmm, are there any other classes where something other than a real XML parser is likely to be feeding data into XOM? Probably, but I can't think of any off the top of my head. Still, the possibility that someone is using a funky filter that calls characters() in a pattern quite different from what you'd expect in an XML parser does suggest that Wolfgang is right and XOMHandler should use a StringBuffer for multiple calls to characters. I'll put that on the TODO list.

--
Elliotte Rusty Harold elharo AT metalab.unc.edu
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




Archive powered by MHonArc 2.6.24.

Top of Page