Tuesday, April 15, 2014

Speed Up Your XSLT – Automatically

Once you’ve written XSLT code to produce the desired output, optimizing it to deliver the fastest execution is tricky business. Even with the powerful XSLT profiler in XMLSpy, a developer is required to have expert-level XSLT skills to test and fix the bottlenecks that the XSLT profiler identifies. Is the problem in an XPath expression? Is it an XSLT instruction? This can be a frustrating and time consuming task.
To help alleviate this issue and bring the power of XSLT to developers of all skill levels, XMLSpy 2014r2 now includes the XSL Speed Optimizer, which provides fixes to remove bottlenecksautomatically to immediately speed up your XSLT execution – it’s a revolutionary approach to optimizing XSLT performance.
XSL Speed Optimizer
Let’s take a look at how this works, and see how you can use it to speed up XSLT code.

 

XSL Speed Optimizer

The XMLSpy XSL Speed Optimizer is a brand new, innovative approach to speeding up XSLT transformations. With one click, you can implement an optimization that immediately increases throughput, avoiding the manual analysis and testing usually required to resolve XPath or XSLT-related bottlenecks. This frees you to focus on the transformation logic of your stylesheets and leave speed optimization to XMLSpy.
To use the XSL Speed Optimizer, simply supply an existing XSLT stylesheet along with sample XML data. You can configure a time threshold for single XSLT instructions in a stylesheet, with values ranging from 0.1% of total transformation time to 99% of total time. (.5% is the default value.) If an instruction takes more time to execute than the specified threshold, then optimization analysis is invoked.

How Does It Work?

Once you supply an XSLT stylesheet and sample XML dataset, the XSL Speed Optimizer analyzes the transformation to identify bottlenecks based on the time threshold you’ve set. Then it tests the code against proven best-practices and optimization patterns, as well as proprietary information, to determine speed improvements. It does not alter the XSLT directly, but rather generates XML processing instructions (PI) to automatically insert at the end of the stylesheet.
Then the XSL Speed Optimizer re-runs the execution to determine which optimizations result in an increase in speed, and only saves those that have a positive impact. The optimized stylesheet can then be used to produce faster transformations.

In a test I ran today, I set a minimum relative time limit of .1%, and the XSL Speed Optimizer was able to decrease execution time by 18%!
via:http://blog.altova.com/2014/04/speed-up-your-xslt-automatically.html?utm_source=feedburner&utm_medium=feed&utm_campaign=Feed%3A+Altova+%28Altova+Blog%29

No comments:

Post a Comment