Project

Profile

Help

Saxon EE taking longer than Saxon HE to execute some xslts

Added by Pedro Reis almost 6 years ago

I'm in an evaluation phase of Saxon EE to understand if makes sense to migrate from my current XSLT engine to Saxon.

My firsts tests were done considering the Saxon-HE and now I want to measure the gains of the EE. However, in some internal tests (in a very simple Java project) I'm experiencing a 'bad performance' of Saxon EE- in a general way, Saxon HE is performing better than EE.

Is there any threshold or configuration to see the gains of EE?


Replies (1)

RE: Saxon EE taking longer than Saxon HE to execute some xslts - Added by Michael Kay almost 6 years ago

There are many possible factors at play here.

First of all, it's important to measure compile time and execution time independently. Saxon-EE does more optimization, which will generally increase compilation time, but the hope is that the improvement in run-time will compensate for this. However, if you compile a stylesheet each time it is executed, that is not necessarily the case, and in that scenario it may be better to switch some optimizations off.

In fact in a typical transformation there are four main factors: compilation time, parsing time, transformation time, and serialization time. The ratio between these four is highly variable depending on the nature of the source document and stylesheet. For a simple transformation on a large document, parsing time will dominate over transformation time, which may mean that all Saxon's optimization efforts are in vain, because parsing time is out of our control.

Secondly, it's important to discount Java VM warm-up time. If you run anything that takes less than 20 seconds or so, then the performance is dominated by JVM warm-up time. It takes longer to load Saxon-EE than to load Saxon-HE because it's twice the size. If you're running a workload where you bring up a new Java VM for every transformation then that's a problem, but in most realistic scenarios that isn't the case.

With performance the devil is always in the detail. If you're getting a workload where Saxon-EE takes longer than Saxon-HE then we're certainly interested in understanding why, but the first thing we look at is to see exactly what you are measuring - because there are lots of pitfalls that can mean your benchmark measurements aren't representative of actual production performance.

Some of the performance benefits of Saxon-EE come "out of the box" (you don't need to change anything in your code) but some of them only give benefits if you design your application to take advantage of them. Streaming and schema-awareness are obvious examples.

So - please share the detail so we can look at it!

    (1-1/1)

    Please register to reply