Page 1 of 1

XSLT profile multiple files?

Posted: Tue Dec 03, 2013 9:37 am
by evalUsr
Is it possible to profile an XSL by sending multiple files though it and see the hotspots and invocation data overall?

Re: XSLT profile multiple files?

Posted: Tue Dec 03, 2013 6:52 pm
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

Re: XSLT profile multiple files?

Posted: Thu Dec 05, 2013 8:09 am
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.

Re: XSLT profile multiple files?

Posted: Mon Dec 23, 2013 6:34 pm
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