xsl-list
[Top] [All Lists]

Re: how to estimate speed of a transformation

2003-12-11 05:24:52
On Thu, Dec 11, 2003 at 11:28:22AM +0400, David Tolpin wrote:
On the other hand, if a template contains a variable definition that does 
depend
on template's parameters,

<xsl:template name="footer">
  <xsl:variable name="doctitle" select="/book/descendant::title[1]"/>

the programmer should expect that the computation takes place only once.

  Well then that would be just wrong. It depends what document is in context.
And if the programmer used node-set() it's a dynamically generated document,
much like document() results. Do you think you would cache all the results
for such request ? well, if you do, your memory consumption may just explode.
Your vision of the actual tradeoff related to implementing an XSLT processor
seem to be rooted in theory, but doesn't seems to take into account a number
of problems associated. The variable in question could be associated to a 
10 MBytes memory tree.

Daniel

-- 
Daniel Veillard      | libxml Gnome XML XSLT toolkit  http://xmlsoft.org/
daniel(_at_)veillard(_dot_)com  | Rpmfind RPM search engine http://rpmfind.net/
http://veillard.com/ | 

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