XSLT profile multiple files?

Here should go questions about transforming XML with XSLT and FOP.
evalUsr
Posts: 2
Joined: Sat Jun 16, 2012 9:59 am

XSLT profile multiple files?

Post by evalUsr »

Is it possible to profile an XSL by sending multiple files though it and see the hotspots and invocation data overall?
adrian
Posts: 2879
Joined: Tue May 17, 2005 4:01 pm

Re: XSLT profile multiple files?

Post by adrian »

Hello,

Right now (v15.1) it's possible to profile only one transformation session at a time, which usually means one input XML file and one transformation XSL stylesheet. We have a feature request logged to allow profiling multiple input XML files in a future version.

To work around this, you could alter your stylesheet to process several XMLs in one transformation (e.g. use a collection).

Regards,
Adrian
Adrian Buza
<oXygen/> XML Editor, Schema Editor and XSLT Editor/Debugger
http://www.oxygenxml.com
evalUsr
Posts: 2
Joined: Sat Jun 16, 2012 9:59 am

Re: XSLT profile multiple files?

Post by evalUsr »

Thanks for the quick reply. Good to hear its something on your radar.

I thought about trying to make a style sheet that loads and process multiple document node sets. I figured that the top document processes calls might crowd out the hotspots though.

Also, i am not sure if the profiling would profile additional xsl files that are imported or not.
I'm hoping to be able to somehow profile an xsl that takes over 3 hours to run through about 4,500 documents that add up to about 30MB.
sorin_ristache
Posts: 4141
Joined: Fri Mar 28, 2003 2:12 pm

Re: XSLT profile multiple files?

Post by sorin_ristache »

Hello,

Yes, that is how you can profile the entire XSLT transformation (main XSLT file and all included and imported ones at the same time) applied on multiple input XML documents (about 4,500 in your case): iterate through all input XML documents (using the document() function) and repeatedly call the same transformation on each XML input. If the entire processing (a total of only 30 MB spread over 4,500 input XML files) takes 3 hours then you can be sure that the overhead of loading the XML files will add an insignificant percentage of the actual XSLT processing that runs 4,500 times. So the answer is no, the overhead of loading the XML files will not crowd out the actual hotspots in the XSLT processing, given your test conditions (total time needed to parse 30 MB of XML data as a percentage of a total of 3 hours of XSLT processing).

In fact profiling the total time of the same XSLT processing that runs 4,500 times will be much more accurate than profiling that XSLT processing that runs only once :)


Regards,
Sorin
Post Reply