xsl-list
[Top] [All Lists]

Re: xslt processors

2004-10-08 09:56:08
On Friday 08 of October 2004 18:41, Werner, Wolfgang wrote:
Perhaps you can tune you xsl once you know where the bottleneck is.


Bottleneck is simply select to some big element. I can't tune it. I 
have reduced my code to simple cycle for-each over big xml trees and 
selecting some simple data from it. It was slow.

Example
<data>
        <cyc>
                <id>1</id>
                <services>
                        <service>
                        ...
                        </service>
                        <!-- many and many times again -->
                </services>
        </cyc>
</data>


<xslo:for-each select="data/cyc">
        <xslo:call-template name="templateDoingManyOperationsOverData">
                <xslo:with-param name="param1" select="."/>
        </xslo:call-template>
</xslo:for-each>


<xslo:template name="templateDoingMany....">
        <xslo:param name="param1"/>

        <xslo:value-of select="$param1"/>

        <!--
                Other lines of code (about 3000), which are disabled in comment.
        -->
</xslo:template>

And speed was very slow because <cyc> tree is very big. I have try to 
tell template only index (position) of current <cyc> from main 
template, but speed was slower in currently disabled code when 
referring to /data/cyc[position()=$index]/id many times instead of 
exsl:node-set($param1)/id

-- 


S pozdravom,
Dusan Zatkovsky


<Prev in Thread] Current Thread [Next in Thread>