[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Re: New XSL Optimization
Hey Paul, Paul Prescod wrote: > > I wonder, though, how much time is spent in match selection. My DSSSL > experience tells suggests that it is the code IN the rules that takes the > most time. Still, every little bit helps. > Keep in mind alot of the "code IN the rules" needs match selection: such as <xsl:template match="foo"> <bar> <xsl:apply-templates/> </bar> </xsl:template> Once foo is matched, the "bar" literal elements are added to the result tree, then the match selection starts again when processing bar's child actions. For each of foo's children all template rules need to be looked at to find the "best match" within the given context. And it's recursive, so you may be surprised at how much matching is going on. Every text node needs to be matched by looking at all the template rules as well. Of course you can have pointers to templates that match only certain elements or text nodes and only try to match against those when you come across such a node. It is my experiance that a properly written xsl:for-each will be faster, because the processor does not have to find the template to use, it's basically being handed to the processor. --Keith > -- > Paul Prescod - ISOGEN Consulting Engineer speaking for only himself > http://itrc.uwaterloo.ca/~papresco > > "Scarcely a discussion goes on, between linguistic groups or regions or > even within cities and towns, which is not a struggle between competing > myths of victimization." > - John Ralston Saul, "Reflections on a Siamese Twin" > > XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list 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
|