You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@xalan.apache.org by "Michael J. Andrew" <mi...@rossinc.com> on 2000/07/28 02:51:45 UTC

Severe performance hit on a "simple" tree walk in XSLT

(This is all on NT4)

I'm using version 1.0 (or thereabout, how do I tell for sure?) of xalan and xerces (downloaded ~Feb time).  The following line of
code causes my transform to go from sub second to about 15 seconds on a "simple rectangular" XML table of data, say 20 "rows" of 20
"fields" (embedded a few nodes down in the xml document) which I'm transforming to an html table.

<xsl:variable name="m" select="../../../metadata/field[fieldname=$n]" />

It doesn't strike me that the above line should cause the transform engine so much stress, even if it is recalculating the variable
on a per-field, per-row basis.

To further my woes, I'd like to try this on the latest version to see if that helps, but when I replace my xalan and xerces jars
(which are resident in my webapp web-info/lib directory) I get a message that the "xml parser cannot be created, please put
xalan.jar on the CLASSPATH".  OK, well, it worked ok with v1, but what the heck.  I add both jars to the classpath and I still get
the same message.  Replace the jars with the old V1 jars and everything works fine.  Very strage, but no doubt I'm doing something
dumb.  If you found my first question interesting, maybe you'll help me out with the second dumb one!  (BTW, I am using file:// for
local path names as per the changes faq).

TIA for any suggestions.

Michael Andrew
Ross Systems.