-
Notifications
You must be signed in to change notification settings - Fork 0
Docs Webapp XMLXSL Profiling
Applies to Stubbles 2.0.0 or greater.
Sometimes it is necessary to profile where the bottlenecks in XSL templates are - especially if you have a complete view engine based on XSL. Stubbles supports profiling of the transformations. To enable this, simply put the following configuration switch into the config.ini file of your project:
net.stubbles.xml.xsl.profiling=true
This will cause the view engine to log profile data into the log/xsl folder of the project. The profiling is based on the profiling mechanism provided by PHP's XSLTProcessor::setProfiling() method. As this is a bit limited and each single transformation would overwrite profile data from the request before you will find more then one profile data file after a successful request in the log/xsl folder:
- $route_dom.txt - Profiling data of applying the generated stylesheet to the generated DOM tree for $route.
- $route_skin_$skinName.txt - Profiling data of generating the stylesheet from the skin $skinName for $route.
- $route_$file.txt - Profiling data of transforming a single file from the pages/txt folder. Files from common/pages will have common_ in their file name.
Please note that each request to the same route overwrites already existing profile data. There is no way to gather profile data over the course of several requests due to the limitations of PHP's profile data logging. On the other hand, that should not be a larger problem as normally you don't want to collect profile data in production.