Thanks for your answer Ben.

I use a template that retrieve the Max date (attribute of an element)
for a node.

The template is the following :
-------------------------------------------------
    <xsl:template name="tFindMax">
          <xsl:param name="pNodes" />
          <xsl:param name="pNodeCount" />
          <xsl:param name="pCtr"/>
          <xsl:param name="pLastMax" select="0" />
          <xsl:param name="pDateParam" />
          <xsl:variable name="vdate"
select="concat(substring-after(substring-after($pNodes[$pCtr], '.'),
'.'), substring-before(substring-after($pNodes[$pCtr], '.'), '.'),
substring-before($pNodes[$pCtr], '.'))" />
          <xsl:variable name="vTemp">
               <xsl:choose>
                    <xsl:when test="(number($vdate) &lt;=
number($pDateParam)) and (number($vdate) &gt;= number($pLastMax))">
                        <xsl:value-of select="$vdate"/>
                    </xsl:when>
                    <xsl:otherwise>
                        <xsl:value-of select="$pLastMax"/>
                    </xsl:otherwise>
               </xsl:choose>
          </xsl:variable>

          <xsl:choose>
               <xsl:when test="$pCtr &lt; $pNodeCount">
                    <xsl:call-template name="tFindMax">
                         <xsl:with-param name="pNodes"
select="$pNodes"/>
                         <xsl:with-param name="pNodeCount"
select="$pNodeCount"/>
                         <xsl:with-param name="pCtr" select="$pCtr +
1"/>
                         <xsl:with-param name="pLastMax"
select="$vTemp"/>
                         <xsl:with-param name="pDateParam"
select="$pDateParam "/>
                    </xsl:call-template>
               </xsl:when>
               <xsl:otherwise>
                                  <xsl:choose>
                        <xsl:when test="$vTemp != 0">
                                <xsl:value-of
select="concat(substring($vTemp, 7, 2), '.', substring($vTemp, 5, 2),
'.', substring($vTemp, 1, 4))"/>
                        </xsl:when>
                        <xsl:otherwise>
                                <xsl:value-of select="$vTemp" />
                        </xsl:otherwise>
                   </xsl:choose>
               </xsl:otherwise>
          </xsl:choose>
     </xsl:template>
-------------------------------------------------

It is called like that :
-------------------------------------------------
  <xsl:template match="livre">
    <xsl:variable name="vnocourant" select="@no"/>
    <xsl:variable name="mon_no1" select="[EMAIL PROTECTED]/@date"
/>
    <xsl:variable name="vMaxDate">
          <xsl:call-template name="tFindMax">
        <xsl:with-param name="pNodes" select="$mon_no1"/>
        <xsl:with-param name="pNodeCount" select="count($mon_no1)"/>
        <xsl:with-param name="pCtr" select="1"/>
        <xsl:with-param name="pLastMax" select="0"/>
        <xsl:with-param name="pDateParam" select="$date" />
      </xsl:call-template>
    </xsl:variable>

<!-- then I can use the variable $vMaxDate -->
  </xsl:template>
-------------------------------------------------

Probably this function reduce performances.
Any suggestion ?

I use Cocoon 2.1.5.1 on BEA with JDK 1.4.1
I don't have the server JVM parameters info actually. Do you think I
should pass some particular parameters (I don't think it is a memory
problem, only the processor work at 100% during all the convertion
time).

Thanks
Olivier


>>> [EMAIL PROTECTED] 01/10/04 11:48 >>>
Some further details would be useful:

Sample data (not all of it, but an idea of it's complexity)
XSLT

Cocoon version, container version (Tomcat etc)
Caching
JVM info (version, parameters)

Another issue is actually the time it takes for your browser to render
the
page, which can be a long time for large files.

There are many techniques for improving performance, the first is often
XSLT
design.

Ben


-----Original Message-----
From: Olivier Bleses [mailto:[EMAIL PROTECTED] 
Sent: 01 October 2004 10:40
To: [EMAIL PROTECTED]
Cc: Olivier Bleses
Subject: Conversion - performance


Hi,

I have performance problems when generating documents.
For a file with a size of 517 Ko, it takes more than 2 minutes to
generate
the html file (1373 Ko). For this generation, I wrote 2 xsl (and I
reference
the docbook.xsl) and I use Xalan 2.6.0. The result is ok but how can I
improve performance ?

Thanks
Olivier

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to