This is the mail archive of the xsl-list@mulberrytech.com mailing list .


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Regarding XSL performance on AIX


Anand Ganapathy wrote:
> When I do the transformation on WindowsNT it takes 20/25 seconds wheres 
> on AIX it takes 3/4 minutes. I just can figure out why? Does any one have 
> any idea why this happens? Please tell me how I can fine tune my XSL for 
> enhanced performance.

I see an awful lot of XPath expressions that start with "//". These are
notoriously wasteful, resulting in the entire document being searched for the
matching nodes. Have you investigated the use of xsl:key?

>    <xsl:call-template name = "forloop1" >
>       <xsl:with-param name = "j" select = "$j"/>
>       <xsl:with-param name = "count1" select = "$count1"/>
>    </xsl:call-template>

If you are implementing 'for' loops to increment counters, you're probably
needing to have procedural programming bad habits beaten out of you. :)

I didn't take a close look at your stylesheet, but it looks to me like you
looking at the entire document many times, trying to find the information that
you think you need, rather than recursively walking through the entire
document just once and building up your output as you go along.

You should try to employ careful selection of nodes to process with
xsl:apply-templates and xsl:for-each.

Here are a few tree viewer stylesheets that you may also be interested in 
perusing for ideas:

http://skew.org/xml/stylesheets/treeview/ascii/
http://skew.org/xml/stylesheets/treeview/html/
http://www.cranesoftwrights.com/resources/showtree/
(in IE on Win32 only) res://msxml3.dll/defaultss.xsl or res://msxml.dll/defaultss.xsl

   - Mike
____________________________________________________________________________
  mike j. brown                   |  xml/xslt: http://skew.org/xml/
  denver/boulder, colorado, usa   |  resume: http://skew.org/~mike/resume/

 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]