|Performance Profiling of XSLT Stylesheets and XQuery Documents|
Profiling activity is linked with debugging activity, so the first step in order to profile is to switch to debugging perspective and follow the corresponding procedure for debugging (see Working with XSLT Debugger).
Immediately after turning the profiler on two new information views are added to the current debugger information views:
Profiling data is available only after the transformation ends successfully.
Looking to the right side (Hotspots view), you can immediately spot the time the processor spent in each instruction. As an instruction usually calls other instructions the used time of the called instruction is extracted from the duration time of the caller (the hotspot only presents the inherent time of the instruction).
Looking to the left side (Invocation tree view), you can examine how style instructions are processed. This result view is also named call-tree, as it represents the order of style processing. The profiling result shows the duration time for each of the style-instruction including the time needed for its called children.
In any of the above views you can use the backmapping feature in order to find the XSLT stylesheet or XQuery expression definition. Clicking on the selected item cause Oxygen XML Editor to highlight the XSLT stylesheet or XQuery expression source line where the instruction is defined.
When navigating through the trees by opening instruction calls, Oxygen XML Editor automatically expands instructions which are only called by one other instruction themselves.
The profiling data can be saved into XML and HTML format. On any view you should right click , use the pop-up menu and select the corresponding choice. Basically saving HTML means saving XML and applying an XSLT stylesheet to render the report as XML. These stylesheets are included in the Oxygen XML Editor distribution (see the subfolder frameworks/profiler/ of the Oxygen XML Editor installation folder) so you can make your own report based on the profiling raw data.
If you like to change the XSLT/XQuery profiler settings you should right click on view, use the pop-up menu and choose the corresponding View settings entry.