This character is QuickSilver and he’s the fastest of the X-Men. Mule 3.6 has no super powers, but when it comes to XPath, it’s the fastest ever! As you may remember, with the release of Mule 3.6.0 the XPath and XSLT was revamped. In this post, I’d like to not only continue elaborating on how great the improvement is, but also focus on a new aspect: Performance.
The test was quite simple; a test application which executed a pretty simple expression using:
- the new xpath3() MEL function
- the old and deprecated xpath() function
- the xpath-extractor-transformer
- the xpath-filter message processor
Here are the flows:
This app was put to a load test with the following settings:
- 100 concurrent threads
- 300 seconds runs
- 30 seconds warm-up period
The test was executed using standalone distributions of Mule 3.5.2 and Mule 3.6.2.
Gotcha: Why is the Jetty transport used to trigger the flows instead of the new HTTP connector introduced in Mule 3.6 (or even the old HTTP transport)? Well, the new HTTP transport is not available on 3.5.2, so if we had used it on 3.6.2 the test would be biased since the connector’s improved performance would show a speed boost not attributable to the XPath improvement. At the same time, the HTTP transport was deprecated since 3.6.0 and it doesn’t make sense to run performance tests on deprecated stuff. So, the test was done using the Jetty transport.
They say that a pictures worth a thousand words, so here it goes:
This chart has the tested functionality on the X axis, and the TPS (transactions per second) that were obtained on each test run on the Y axis. In the case of the xpath() function, the new xpath3() function was used when running with Mule 3.6.2 while the traditional xpath() one was used on 3.5.2
- The most astonishing improvement is seen on the comparison between the xpath3() and xpath() functions. Xpath() gave an average of 91 TPS while xpath3() gave 1277. This is a 92.87% increase in performance.
- Next is the improvement on the xpath-filter. 3.6.2 ran 1789 TPS vs 686 of 3.5.2. This is 61.65% improvement.
- Lastly, is the extractor transformer, 3.6.2 hit 1284 TPS vs 679 on 3.5.2, which represents a 47.11% increase in speed.
If you use these features in your applications, you’re likely to benefit from performance improvements by upgrading to 3.6.x or greater. Take into account, however, that performance tests are like the pirate code – they’re more of a guideline than an actual law. These are the results of running a particular case (which was considered representative enough on a certain scenario). If you run your particular app, on your own particular environment, your results are likely to be consistent with these, but could also be better or worse.
Stay tuned! This post covered the performance improvements on XPath but Mule 3.6 also got some love on the XSLT support as well. A follow-up post is coming in which we’ll cover that.
Lastly, although I have had the pleasure of writing this post for y’all, real credit should go to the mighty Luciano Gandini from our very awesome performance team. He’s the real genius who not only designed and executed these tests, but also worked the magic to extract the results and turn them into information.
Thanks for reading!