[XML-SIG] re : XSL Performance / Processors

Philippe Dubreuil philippe.dubreuil@inrialpes.fr
Tue, 01 Apr 2003 17:06:36 +0200


Hello,

I'm actually working on xsl processor, and particulary on saxon and xalan.
I would like to show that builtin XSLT indexing mechanisms (i.e 
<xsl:key> tag) are  very useful, and then find a way to propagate them 
through several
transformations.

I have done some tests : Saxon is really faster than Xalan. They are two 
different tree implementations in Saxon. The use of tinytree seems to 
decrease the performance whereas results are really "good" with tree 
implementation.

The tinytree  should win because it is faster to
build, and uses less memory: in principle the full tree should be faster
if you keep it in memory and use it often enough to pay for the extra
build cost.
The key implementation in the two cases is identical.


But nobody can explain my results :
"Performance can depend on many apparently unrelated factors (including
the fluttering of the wings of a butterfly...)" M.Kay 


Example----------
I use for my example a typical bibliography document, ie
<biblio..>
<reference><authors><p first=".." last=".."/></authors>
    <title> (...)
</reference>

size ~(5Mo)

    
Here are parts of stylesheets that I use: withIndex :
key declaration
<xsl:key name="clef2" match="//reference" use="authors/p/@last">

<xsl:for-each select='key("clef2","zorro")'>
    <li><xsl:value-of select="title"/></li>
</xsl:for-each>


noIndex <xsl:for-each select="//reference/authors/p[@last='zorro']">
    <li><xsl:value-of select=".../../title"/></li>
</xsl:for-each>

Some of my results (execution Time)  (RedHat 6.2, i686, 256Mo RAM, PIII 
550Mhz)
I'm using the same structure (index or not) three times in this example.
If I use 10 times, i get the same results.

 
                  withIndex               noIndex
Xalan2.5             8780ms                 9108ms    
Saxon6.5.2  tree     2800ms                 2900ms
"          tinytree 3021ms                 1757ms   !!!!

---------------------------------------------

I'm really interested in finding similar results.
thanks


Phil. Dubreuil
INRIA Rhone Alpes
FRANCE