[XSL-LIST Mailing List Archive Home] [By Thread] [By Date]

RE: XSLT processors performance/compliance matrix


Subject: RE: XSLT processors performance/compliance matrix
From: Kay Michael <Michael.Kay@xxxxxxx>
Date: Fri, 21 Jan 2000 10:29:25 -0000

A few performance tips off the top of my head. I suspect they are likely to
apply to most processors.

- Keep the patterns in template rules simple, use conditional logic within
the template rather than having hundreds of different rules to be matched.
Especially avoid positional predicates in patterns, e.g. <xsl:template
match="para[last()-1]">.

- Use "/descendant::*" in preference to "//*". The latter, if implemented
naively, is interpreted as /descendant-or-self::*/child::*, which finds all
descendant elements of the root, then finds their child elements, then sorts
the result into document order. The former finds all the descendant elements
of the root directly, and they probably don't need to be sorted. The two
constructs are equivalent provided there is no positional predicate.

- Use position() in preference to <xsl:number/> wherever possible.

- Many of the algorithms for solving grouping problems in XSLT have
n-squared or even n-cubed performance. If you need to do grouping on a large
data set, consider preprocessing it first to add extra element nodes around
the groups. You can do this preprocessing with a simple SAX filter, or by
using proprietary XSL extensions such as SAXON's <saxon:group>.

- If you are transforming many source documents, especially if they use the
same stylesheet, control the process using the vendor's proprietary API,
rather than writing a script that runs  each one from the command line. The
initialisation time fror getting the Java VM running and loading all the
classes can dominate the actual stylesheet execution cost. 



> -----Original Message-----
> From: James Tauber [mailto:JTauber@xxxxxxxxxxxxx]
> Sent: 20 January 2000 19:37
> To: 'xsl-list@xxxxxxxxxxxxxxxx'
> Subject: XSLT processors performance/compliance matrix
> 
> 
> I'd like to add a performance/compliance matrix for XSLT processors to
> XSLINFO and XMLSOFTWARE.
> 
> As a first pass, I'd like to bring together the findings of 
> people on this
> list. So please send me any stuff you have. I'll put it up on 
> the sites and
> let this list know.
> 
> James
> --
> James Tauber               jtauber@xxxxxxxxxxxxx
> Director XML Technology    www.jtauber.com
> Bowstreet Software, Inc.   www.bowstreet.com
> 
> 
>  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
Keywords