[XSL-LIST Mailing List Archive Home]
[xsl] The benefits of exact selection
Subject: [xsl] The benefits of exact selection|
From: Jesper Tverskov <jesper@xxxxxxxxxxx>
Date: Fri, 6 Nov 2009 12:21:49 +0100
We always hear that we should select as exactly as possible, and that
wildcards are inefficient. It makes sense.
But I'm tired of just telling it to my students so I set out to
construct a little transformation test that can demonstrate it in the
I ended up with a million lines subdivided into 1050 children, each
having 140 children, each having 3 children. In what I believe is the
last element in document order, I might be wrong, I added a lonely
attribute with some value.
The two alternative select expressions are as follows:
Using Saxon PE from inside Oxygen, I transformed 20 times for each.
Here is the average time as reported by Oxygen:
1) Exact selection: 4.1s
2) Wildcard selection: 5.0s
That is a difference. But it is also fair to say that for most
transformations, on a small dataset, it will be impossible to measure
a difference of any importance.
I would like to know about real life cases where removing not
necessary wildcard matching improved the transformation speed?