Re: xsl:call-template & performance?
Hillyard, Matthew wrote: > Apart from the obvious benefits of modularity and maintainability, does > anyone have any empirical (or anecdotal) evidence as to the relative > performance of using xsl:call-templates against repetitive xsl:templates > always written out in full in situ? This would seem to be something that depends on the processor implementation, and to some degree, your source tree and the kind of processing you are doing on it. Even how you access the data (//foo vs /path/to/foo, for example). I'm sure someone could find a counterexample for any example provided. That said, I recently discovered that SAXON gets pretty slow when I am many levels deep into nested call-templates/with-param blocks, where some of the params you pass are the result tree fragments returned by the nested call-templates instructions. Or did you mean to ask about the relative advantages of having templates that match various nodes and letting the processor navigate the source tree via apply-templates, vs the approach of making one big template that matches just the root node, occasionally calling named templates to do repetitive tasks? I haven't found any persuasive performance stats one way or the other to argue a case on that basis alone. - Mike ____________________________________________________________________ Mike J. Brown, software engineer at My XML/XSL resources: webb.net in Denver, Colorado, USA http://skew.org/xml/ XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
PURCHASE STYLUS STUDIO ONLINE TODAY!
Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!
Download The World's Best XML IDE!
Accelerate XML development with our award-winning XML IDE - Download a free trial today!
Subscribe in XML format