RE: [xsl] exsl:node-set in xalan

Subject: RE: [xsl] exsl:node-set in xalan
From: "Michael Kay" <mhk@xxxxxxxxx>
Date: Sat, 17 Jan 2004 11:36:52 -0000
I haven't had a chance to analyze this yet (and I may not be able to
this week), but one quick point is that wherever the Saxon performance
problem is, it's not actually in exsl:node-set(). That's because all
that exsl:node-set() does is to flip a bit saying that the tree can be
used as a normal document.

The problem (or opportunity for improvement!) is much more likely to be
in optimization of copying operations on trees.

An observation, on line 65 of incelim.xsl

	<xsl:copy-of select="exsl:node-set($rng)"/>

there is no need for a call on exsl:node-set() here. You can copy an RTF
directly.

Michael Kay 

> -----Original Message-----
> From: owner-xsl-list@xxxxxxxxxxxxxxxxxxxxxx 
> [mailto:owner-xsl-list@xxxxxxxxxxxxxxxxxxxxxx] On Behalf Of 
> David Tolpin
> Sent: 17 January 2004 06:10
> To: xsl-list@xxxxxxxxxxxxxxxxxxxxxx
> Subject: Re: [xsl] exsl:node-set in xalan
> 
> 
> [ Charset ISO-8859-1 unsupported, converting... ]
> > 
> > Not sure this helps, but I get 12 sec for the shell script & only
> > 3.5 with the stylesheet using 3 rinses on xhtml.rng. This is 
> > with Saxon 6.5.3 on RedHat with a 2.4GHz proc. Sounds like it 
> > might still be something environmental rather than Saxon. 
> > 
> 
> I've been able to reproduce the result for xhtml with JDK 
> 1.4.1/HotSpot (the
> original results where with 1.3.1_08/OpenJIT, which launches 
> faster and runs
> slower), but it does not change the trend. While the 
> relatively small xhtml
> (which is a toy for the application) is faster, the larger 
> TEI or DocBook are
> still much slower. With JDK 1.4.1/HotSpot, the stylesheet version is 
>     3 times faster than the script version for Xhmtl, 80Kb, 
> but 2.5 times slower with DocBook, which is 900Kb.
> 
> In practice, stylesheets can be larger than DocBook in the 
> example (docbook
> with MathML and SVG, for example). But whether a stylesheet 
> is large or small,
> why the dependency is so steep in both SAXON and jd.xslt?
> 
> This behaviour is also exhibited by jd.xslt, but not by Xalan. 
> Xalan consistenly runs the stylesheet version faster on any 
> data with exsl
> stylesheet than with the script.
> 
> David Tolpin
> http://davidashen.net/
> 
>  XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
> 


 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list


Current Thread