This is the mail archive of the
xsl-list@mulberrytech.com
mailing list .
RE: performance with XSLT
- From: "Michael Kay" <michael dot h dot kay at ntlworld dot com>
- To: <xsl-list at lists dot mulberrytech dot com>
- Date: Wed, 9 Jan 2002 09:58:29 -0000
- Subject: RE: [xsl] performance with XSLT
- Reply-to: xsl-list at lists dot mulberrytech dot com
> Can some one give me an idea about performance issues
> with XSLT? what are the best practices to achieve the
> good performance.
The best practices are the same as with any other technology:
- define your performance requirements
- prototype to assess the risk
- allow enough time on the project to acquire the skills
- make measurements at every stage of development
- don't optimize your code unless it works
- don't optimize your code unless it gives measurable benefits
Most of the advice for XSLT is also fairly obvious:
- cache compiled stylesheets rather than compiling them each time
- keep your source documents small
- don't do the same transformation more than once, save the results instead
- don't transform anything unless someone is going to use the result
- remember that XSLT is not the only tool in your kitbag
At the coding level:
- think carefully about anything that deviates from a serial pass through
the data
- use keys where direct access to nodes is needed (often suggested by "//")
Mike Kay
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list