I thought of a fairly simply but pretty effective way to make xsl:number faster. For level=any and level=single: We remember which node we numbered and remember which number we gave that node. The next time we calculate the number for a node we compare each node we look at with the rembmered node. If they are the same we can stop the counting since we know how many matching nodes exists after that node. For level=multiple: Same thing except that we might want to remember node and number for each level.
I was wondering if we should just do this like we do it with keys, that is, once the xsl:number is triggered, number the corresponding source tree and hash the result. I bet it's fairly uncommon to just number a subset, so in general we shouldn't waste too much time for potentially counting parts that don't need counting. At least for level=any, as that walks back the complete tree.
reassining bugs i'm not working on to default owner
Assignee: bugmail → peterv
Status: NEW → RESOLVED
Last Resolved: 11 months ago
Resolution: --- → WONTFIX
You need to log in before you can comment on or make changes to this bug.