ideas for faster xsl:number

RESOLVED WONTFIX

Status

()

Core
XSLT
--
enhancement
RESOLVED WONTFIX
16 years ago
11 months ago

People

(Reporter: sicking, Assigned: peterv)

Tracking

({perf})

Trunk
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

(URL)

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.

Comment 1

15 years ago
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
QA Contact: keith → xslt

Updated

11 months ago
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.