History | Edit

Profiling activity is linked with debugging activity, so the first step in profiling is to switch to the debugging perspective and follow the corresponding procedure for debugging (see Steps in a Typical Debugging Process).

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.

Figure: Source backmapping

In any of the above views you can use the backmapping feature to find the XSLT stylesheet or XQuery expression definition. Clicking 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 that are only called by one other instruction themselves.

The profiling data can be saved into XML and HTML format. On any of the above views, use the contextual 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 [OXYGEN_INSTALL_DIR]/frameworks/profiler/) so you can make your own report based on the profiling raw data.

If you want to change the XSLT/XQuery profiler settings, use the contextual menu and choose the corresponding View settings entry.

Profiling exhaustive transformation may run into an OutOfMemory error due to the large amount of information being collected. If this is the case you can close unused projects when running the profiling or use high values for Java VM options -Xms and -Xmx. If this does not help you can shorten your source XML file and try again.

To watch our video demonstration about the XSLT/XQuery Profiler, go to https://www.oxygenxml.com/demo/XSLT_Profiling.html.