xsl-list
[Top] [All Lists]

Re: Fwd: [xsl] curly braces

2012-09-19 20:13:05
On Thu, Sep 20, 2012 at 12:11 AM, Michael Kay <mike(_at_)saxonica(_dot_)com> 
wrote:


The idea of reading the source document using document('') is a hack used in
XSLT 1.0 to get around the restrictions on using result tree fragments. It
is never needed in XSLT 2.0: use the global variable directly. (It's also a
very inefficient hack, because the stylesheet has to be parsed twice.)


My benchmarks don't bear that out (To be fair the stylesheet is
compact but still......).
 Higher average execution time when not using doc('') but with a
smaller range and variance (which I haven't calculated but stands to
reason because of the outliers).

Benchmark data

Version with document('')

Ignoring first 2 times
Total Time (last 998 runs): 2 minutes 9 seconds
Average Time (last 998 runs): 129 ms

Only 4 responses above 1 second.
Slowest response 2.75 seconds


Version without document('')

Ignoring first 2 times
Total Time (last 998 runs): 2 minutes 23 seconds
Average Time (last 998 runs): 143 ms

All responses below 1 second
Slowest response 657ms

--~------------------------------------------------------------------
XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: <mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--

<Prev in Thread] Current Thread [Next in Thread>