[xslt] Re: xsl:key degenerate performance



> Thanks for the information, and for the analysis.  Could you please
> open a bug report (enhancement request) for this so it doesn't get
> overlooked?  Thanks -
>
> Bill

Yes, I will do that.

Incidentally, I have tried out one possible solution, which is simply to
test whether the nodes are sorted first, before attempting to sort them. In
other words, you just compare each node with the next one in the list, and
don't bother sorting if they are already in ascending order. In my test case
(and in many other situations too, I imagine), this works especially quickly
because the node comparison routine (xmlXPathCmpNodes) is optimised for
sibling nodes (using the ->next and ->previous pointers). Anyway, the
performance improvement is staggering!

Chris






[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]