Subject: RE: [xsl] XSL: For-Each Efficient or Not? From: "Schrooten, Ben" <bschrooten@xxxxxxxxxxxxxxxxx> Date: Mon, 1 Jul 2002 12:02:53 -0400 |
Thank you for your replies. With our XML documents being heavily static and predictable i just needed some verification that the idea of xsl:for-each causing a performance hit was not the case. Best Regards, Ben Schrooten -----Original Message----- From: Wendell Piez [mailto:wapiez@xxxxxxxxxxxxxxxx] Sent: Monday, July 01, 2002 11:45 AM To: xsl-list@xxxxxxxxxxxxxxxxxxxxxx Subject: Re: [xsl] XSL: For-Each Efficient or Not? What Kevin says about the performance impact of complex matches would also seem to provide another reason why an XPath like m:apply[factorof[not(preceding-sibling::*)]] will be better than m:apply[child::*[position()=1 and name()='factorof']] which tests (what amounts to) the same thing. The first expression does not have to look at every child of the m:apply to see whether it meets the condition, and doesn't need to evaluate all those functions. Not knowing the innards of any processor, of course, I'm only speaking in principle. Cheers, Wendell At 12:15 PM 7/1/2002, you wrote: >And the complexity of the template match expressions in the stylesheets. >Simple tests on name or nodetype can be efficient but matches that involve >predicates are generally harder for a processor to index. These can cause >some processors to use sequential searching for a templates (slow for large >numbers of templates). I have seen the performance of some stylesheets >completely cripled by use of complex matches, e.g., > ><xsl:template match="m:apply[child::*[position()=1 and name()='factorof']]"> > >So its very specific to a processor/stylesheet pair and complex tests are >better done in for-each/if blocks if performance is more important than >maintainability. ====================================================================== Wendell Piez mailto:wapiez@xxxxxxxxxxxxxxxx Mulberry Technologies, Inc. http://www.mulberrytech.com 17 West Jefferson Street Direct Phone: 301/315-9635 Suite 207 Phone: 301/315-9631 Rockville, MD 20850 Fax: 301/315-8285 ---------------------------------------------------------------------- Mulberry Technologies: A Consultancy Specializing in SGML and XML ====================================================================== XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
Re: [xsl] XSL: For-Each Efficient o, Vasu Chakkera | Thread | [xsl] Urgent: Load a document in XA, Tuan-Dung Cao |
RE: [xsl] disable-output-escaping, Vasu Chakkera | Date | RE: [xsl] XSL: For-Each Efficient o, bryan |
Month |