Re: [xsl] Here's how to benchmark your XSLT program's execution time

Subject: Re: [xsl] Here's how to benchmark your XSLT program's execution time
From: "Michael Kay mike@xxxxxxxxxxxx" <xsl-list-service@xxxxxxxxxxxxxxxxxxxxxx>
Date: Thu, 6 Nov 2014 18:09:50 -0000
> What does this tell you?

Very little, unless you are very careful and know exactly what you are doing.
For example, the cost you measure might include "side-effects" such as
building an xsl:key index or evaluating a global variable. There is so much
opportunity for an XSLT processor to do things eagerly or lazily, (or
increasingly, in parallel), that any numbers for the cost of evaluating
individual templates need very careful interpretation.

But the numbers do give a clue where to look first for performance problems. I
had a problem stylesheet recently where the Saxon profile showed 99% of the
time being spent in one template rule. The problem code wasn't actually in
that rule, it was in a match pattern of another rule that was being invoked by
an apply-templates call in the "expensive" rule.

Michael Kay
Saxonica

Current Thread