[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Re: Fwd: curly braces
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
|
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|