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]

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


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