Closed Bug 77889 Opened 24 years ago Closed 24 years ago

replace {cl=node.getChildNodes;for () current=cl.item} with cl.nextSibling iteration

Categories

(Core :: XSLT, defect)

defect
Not set
normal

Tracking

()

VERIFIED FIXED

People

(Reporter: axel, Assigned: axel)

References

Details

Attachments

(2 files)

doing NodeList* nl = xslTemplate->getChildNodes(); for (UInt32 i = 0; i < nl->getLength(); i++) { Node* current = nl->item(i); is a N^2 algo, as we iterate thru a List in NodeList. Replace that with Node* child = NULL; if (xslElement) child = xslElement->getFirstChild(); while (child) { child = child->getNextSibling(); } This should boost our performance QUITE a bit. Thanx and assignenment to sicking for triggering this. Axel
Blocks: 40672
grabbing this one. The performance difference is only small though. Anyway, I have a patch, so you shall get it. I haven't found a way to do this good for Attributes, as they don't have nextSibling. Axel
Assignee: sicking → axel
r/a=peterv
Hi Johnny, could I have a sr for this one? Thanx Axel
Status: NEW → ASSIGNED
I appologize for the delay here, I've been swamped with bugzilla mails lately and didn't see this until now... sr=jst
fix checked in, axel
Status: ASSIGNED → RESOLVED
Closed: 24 years ago
Resolution: --- → FIXED
bitching buttons, verfication spam
Status: RESOLVED → VERIFIED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: