[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Re: How is memory allocated in recursive XSLT template
On 5/3/07, Michael Kay <mike@xxxxxxxxxxxx> wrote:
> > I think I would prefer an extension function within the XSLT > itself rather than from the command line, because then I > would be able to note the time immediately before and after > the function in question.
I tried java -Xss16384k -jar c:\dev\saxonb8-9-0-3j\saxon8.jar -it mainTemplate -TP recursion.xsl 2>profile.xml java -jar c:\dev\saxonb8-9-0-3j\saxon8.jar profile.xml timing-profile.xsl >profile.html and saw a nice summary of the timing analysis in profile.html In my case since I tried to calculate the factorial of 10450 , the profile.xml was about 1MB, this of course is because of the huge number of nested function calls. I find the breakdown of each functions time made possible by Saxons -TP option quite useful. Then I lowered the parameter to factorial of 10, and observed that the function calls are nested inside profile.xml , which makes is useful to trace how they're called. 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.
To me it is not important to calculate the time precisely, nevertheless it is useful to know the fact. figures for a template or function that's executed several hundred times.
Michael Kay http://www.saxonica.com/
|
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
|