Subject: Re: [xsl] bad programming for speedup? From: Justin Johansson <procode@xxxxxxxxxx> Date: Tue, 24 Jul 2007 20:42:33 +0900 |
Abel, >ouch, this hurts my eyes ;) It hurts my eyes too but, IMHO, there is no such thing as a silly question as the list has now received several well-informed responses, including yours, that make for very interesting discussion (not that I am suggesting that you were berating the question in any way whatsoever). Anyway, since you proposed what looks like an excellent solution, I'd like to ask 1. If anything would be achieved anything performance-wise by splitting that copy-of-union into two instructions, viz., <xsl:copy-of select=". " /> <xsl:copy-of select="following-sibling::row" /> and thereby saving the processor the potential overhead of having to do doc-order comparison on nodes in calculating the union. Further in the general case of copy-of select="$a | $b | $c" when one already knows that $a nodes precede $b nodes which, in turn, precede $c nodes in document order, is it more efficient to split these into individual copy operations, viz. copy-of select="$a " copy-of select="$b " copy-of select="$c" 2. Apart the fact that xsl:copy-of has some additional special-purpose attributes over and above xsl:sequence, is there any discernable difference between xsl:copy-of and xsl:sequence. Accordingly, in your solution having the following instead would have achieved exactly the same result and with exactly the same performance? <xsl:sequence-of select=". | following-sibling::row" /> I'm suspecting that the answer to this question will be quite interesting as well, perhaps depending on whether one is serializing final output or writing a sequence constuctor for an xsl:variable. Cheers also Justin Johansson Australia
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
Re: [xsl] bad programming for speed, Abel Braaksma | Thread | Re: [xsl] bad programming for speed, James Fuller |
[xsl] [ann] Kernow 1.5.1, Andrew Welch | Date | Re: [xsl] bad programming for speed, Abel Braaksma |
Month |