I don't know of any comprehensive list. In fact, you probably don't want a comprehensive list, you want a "top ten mistakes to avoid". Most people would put "//x" in that list, though actually Saxon does quite a good job of optimizing that most of the time - there's a lot of folklore in this and advice written five years ago is not always true today. "Use keys whenever possible" is probably one of the top tips, and one of my pet gripes is to encourage use of <xsl:variable name="x" select="y"/> rather than using a nested xsl:value-of.
But I think the most important tip is to be systematic and methodical about performance engineering: set objectives, create a measurement framework, measure actual against target, investigate where the costs are going, apply the improvements where they will make a difference, measure the impact of changes before committing them. That's nothing to do with XSLT specifically, but that's what makes the difference between code that performs well and code that doesn't. You don't get good performance just by following a cookbook set of coding tips. In fact, if you want one brief tip, it is to focus not on performance improvement, but on performance measurement: once you can measure things well, improving is easy.
__________________
Michael Kay
http://www.saxonica.com/
Author, XSLT 2.0 and XPath 2.0 Programmer\'s Reference
|