Re: [xsl] Question of performance

Subject: Re: [xsl] Question of performance
From: "Ragulf Pickaxe" <jawxml@xxxxxxxxxxx>
Date: Wed, 31 Oct 2001 09:37:10 +0000
Hmmmm,

They are of some 15 lines about which 5 of them are context dependent. My thought is that the rest of the 10 lines may be put into a separate variable that can be declared globaly (that is, if performance will be better).
The static lines are simple html/javascript code, since the xsl is used for generating webpages from xml documents.
This is the amount of complexity in the variables.


---
On the same subject, I have a function (template) that is called recursively which also has a variable, ...Aposthrophe>'</xsl:variable> that is used in the template to escape aposthrophes in a string:
<xsl:when $Char=$Aptosthrophe">
<xsl:value-of select="concat('\',$Aposthrophe)"/>
</xsl:when>


As the variable is declared in the top of the template, is this declaration processed each time (I think that it must) and would the code be faster, though less maintainable, if I declare this (static) variable globally?

---
Is there a rule of thomb about when it is best to declare variables in xsl in their scope for better perofrmance compared to how readable the code in question is to be.


Ragulf


From: ronald heller <ronald@xxxxxxxxxxx>
Reply-To: xsl-list@xxxxxxxxxxxxxxxxxxxxxx
To: xsl-list@xxxxxxxxxxxxxxxxxxxxxx
Subject: Re: [xsl] Question of performance
Date: Wed, 31 Oct 2001 09:53:27 +0100

I would say it also depends on the complexity of your variable and what
your preocessor needs to do to get the value, can you post an example?



_________________________________________________________________ Get your FREE download of MSN Explorer at http://explorer.msn.com/intl.asp


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



Current Thread