|
Subject: Re: Fwd: [xsl] curly braces From: Ihe Onwuka <ihe.onwuka@xxxxxxxxxxxxxx> Date: Thu, 20 Sep 2012 02:12:54 +0100 |
On Thu, Sep 20, 2012 at 12:11 AM, Michael Kay <mike@xxxxxxxxxxxx> 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
| Current Thread |
|---|
|
| <- Previous | Index | Next -> |
|---|---|---|
| Re: Fwd: [xsl] curly braces, Ihe Onwuka | Thread | Re: Fwd: [xsl] curly braces, Michael Kay |
| Re: [xsl] program to merge xsl and , David Ryan | Date | [xsl] RE: XSL-FO and Z-index, Kevin Brown |
| Month |