[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

Re: How to output the start execution time and the end

Subject: Re: How to output the start execution time and the end execution time?
From: "Abel Braaksma (Exselt) abel@xxxxxxxxxx" <xsl-list-service@xxxxxxxxxxxxxxxxxxxxxx>
Date: Sat, 6 Sep 2014 17:47:29 -0000
Re:  How to output the start execution time and the end
Hi Wolfgang,

See my latest reply in this thread, about using accumulators, which gets rid
of the issues related to order of execution. Also, in Dimitre's mail, at the
bottom, he noted that you cannot be sure of what you are measuring, because of
the undefined order of (parallelized?) execution.

Alternatively, I think you might be able to rewrite Dimitre's example using
xsl:next-match, to force a proper order of execution. Something like this (not
tested):

<xsl:template match="/" priority="10">
    <!-- get time, this is start time-->
    <xsl:next-match />
</xsl:template>

<xsl:template match="/" priority="9">
    <!-- "normal" processing -->
    <xsl:apply-templates />
    <xsl:next-match />
</xsl:template>

<xsl:template match="/" priority="8">
    <!-- get time, this is end time -->
</xsl:template>

But I am not 100% sure it will get rid of all possible optimizations. I.e.,
when the processor sees the fn:doc calls, it might try to pre-process them
while at the same time already doing template processing. I don't think any
processor optimizes so strongly, but that may be just a matter of time.

Cheers,

Abel Braaksma
http://exselt.net

> From: Wolfgang Laun wolfgang.laun@xxxxxxxxx
>Sent: Saturday, September 06, 2014 7:10 PM

> given that the call to an external timepiece delivers the
> wallclock time: how can one be sure that a call near the
> top of the  XSLT program is executed first, e.g., before
. accessing the main document? And how can one be sure that
> a call near the end of the program is the last thing the
> program does, e.g., even after writing/serializing everything
> and flushing all buffers?

> Not really knowing what one measures? Not being sure how the
> data influences the result?

Current Thread

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.