xsl-list
[Top] [All Lists]

Re: [xsl] How is memory allocated in recursive XSLT templates?

2007-05-03 20:33:11
On 5/3/07, Dimitre Novatchev <dnovatchev(_at_)gmail(_dot_)com> wrote:
> If you're using Saxon, the best way of getting fine-grained instrumentation
> is to use the TimerTraceListener, which can be activated using -TP from the
> command line. This writes a file containing timing information; there's a
> stylesheet called analyze.xsl in the samples folder which allows you to
> summarize this information and determine how much time was spent in each
> template or function.


This is very nice.

Are only template/functions of the main stylesheet module accounted for?

What about template/functions from imported stylesheets?

The timing of templates from the imported stylesheet are accounted
too. I didn't test for functions, but I think they would be too.

Here's a sample output (note the file attribute shows which XSL file a
function or template belongs to):

- <trace time="1178249423468">
- <template name="mainTemplate" file="*main_sheet.xsl" line="11"
time="1178249423468">
- <function name="f:fac" file="*main_sheet.xsl" line="16" time="1178249423484">
- <function name="f:fac" file="*main_sheet.xsl" line="16" time="1178249423484">
- <function name="f:fac" file="*main_sheet.xsl" line="16" time="1178249423484">
- <function name="f:fac" file="*main_sheet.xsl" line="16" time="1178249423484">
 <end time="1178249423484" />
 </function>
 <end time="1178249423484" />
 </function>
 <end time="1178249423484" />
 </function>
 <end time="1178249423484" />
 </function>
- <template name="anotherTemplate" file="*rted_sheet.xsl" line="9"
time="1178249423500">
 <end time="1178249423500" />
 </template>
 <end time="1178249423500" />
 </template>
 <end time="1178249423500" />
 </trace>




--
Cheers,
Dimitre Novatchev

-Regards
Rashmi

--~------------------------------------------------------------------
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>