No, there isn't a good resource. Just an accumulation of blog postings, forum responses, and such like.

For example,

I meant at one time to try to pull it together into a book, but life is too short. Some of the advice you find on the web, like the famous "//", can be misleading - as optimizers improve, implementors put their efforts into things that were once slow, so they become faster.

I think my number one message on performance is to focus on measurement. Invest your effort in measurement; if you can measure performance well, then finding improvements by trial and error becomes easy. Another important message is to start at the top level (the whole system) and drill down - I found one client had been wasting weeks trying to improve XSLT performance when the problem was actually in their own Java code. A measurement technique I like to use is "subtractive measurement" - see how much something costs by measuring how much faster things go if you stop doing it.

Don't be afraid of profiling at the Java level. You may get lots of meaningless information about where Saxon is spending its time, but just occasionally it will turn up a gem, such as revealing that all the cost is going in string-to-decimal conversion, say.

I've probably done 20 serious performance investigations on customer code over the years, and I don't think the solution has been the same for any two. Except that in each case, the solution has been discovered through meticulous measurement.

Michael Kay

On 10/05/2012 10:25, David Rudel wrote:
Is there a good reference for XSLT optimization? I've found a few useful points in Michael's book, but I was hoping to find a resource dedicated to the topic. Google does not appear to find much. One of its top hits started out by suggesting that people not use "//" in every Xpath expression. I'm looking for more non-obvious bits. One example is Michal's compare-and-contrast between two ways of assigning a variable, another is head-tail optimization.

Writing XSL scrips has now become a major part of my job as a data analyst, so I"m looking for ways to cut down the time required for processing.



"A false conclusion, once arrived at and widely accepted is not dislodged easily, and the less it is understood, the more tenaciously it is held." - Cantor's Law of Preservation of Ignorance.

Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 

saxon-help mailing list archived at