Project

Profile

Help

Performance Analysis

Added by Anonymous over 16 years ago

Legacy ID: #4730207 Legacy Poster: pvallone (pvallone)

Hi, I am using SAXON 9.0 .NET to perform my xml transformation. I want to output the time it takes to transform. I was successful checking this using -TD http://www.saxonica.com/documentation/using-xsl/performanceanalysis.html I want to output this time each time the file is transformed. How do I do this? Thanks


Replies (4)

Please register to reply

RE: Performance Analysis - Added by Anonymous over 16 years ago

Legacy ID: #4732176 Legacy Poster: Michael Kay (mhkay)

I'm sorry, I don't think I understood this question. You said you were doing it successfully, so what is it you aren't able to do?

RE: Performance Analysis - Added by Anonymous over 16 years ago

Legacy ID: #4732266 Legacy Poster: pvallone (pvallone)

Hi, I apologize. I should have been more clear. When using the .net command line I would normally write: transform -s:myXML.xml -xsl:c:/xslt/myxslt -o:file:///c:/temp/output.html myurl=file:///c:/myfolder manualtitle="MOM" path=file:///c:/temp When using -TP in the commandline, the trace starts and outputs either to the screen or to a profile.xml Then you run the XSLT timing-profile.xsl you get a nice html file with your analsys. Is there method to calculate the transformation time without the extra steps?

RE: Performance Analysis - Added by Anonymous over 16 years ago

Legacy ID: #4733186 Legacy Poster: Michael Kay (mhkay)

The way that -TP works is (a) at compile time, tracing code is generated in the expression tree. It's important to note that like debugging code, this slows down execution even if it's not switched on at runtime. It's not just the extra instructions that are evaluated, the presence of the trace code actually inhibits some optimizations. So you don't want to do this on except on actual measurement runs. (b) at run-time, a TraceListener is registered; this particular TraceListener outputs a voluminous XML file containing the entry and exit times of templates and functions. The timing-profile.xsl stylesheet then analyzes and summarizes this data. It's possible to do the equivalent things via the Java API (and by diving sufficiently deep into the internals, from the .NET API), but I'm really not sure that you would want to.

RE: Performance Analysis - Added by Anonymous over 16 years ago

Legacy ID: #4733222 Legacy Poster: pvallone (pvallone)

Thank you for the help. The last thing I want to do is slow down the performance. It was pure GUI that I wanted it. In the past we used Kernow's GUI for Saxon. The end users liked the timing that it displays. Now we have moved to the .NET version, which allows us to automate redundant tasks, so I am willing to loose the timing. Thanks again. pvallone

    (1-4/4)

    Please register to reply