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)
Core
XSLT
Tracking
()
VERIFIED
FIXED
People
(Reporter: axel, Assigned: axel)
References
Details
Attachments
(2 files)
(deleted),
patch
|
Details | Diff | Splinter Review | |
(deleted),
patch
|
Details | Diff | Splinter Review |
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
Assignee | ||
Comment 1•24 years ago
|
||
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
Assignee | ||
Comment 2•24 years ago
|
||
Comment 3•24 years ago
|
||
r/a=peterv
Assignee | ||
Comment 4•24 years ago
|
||
Assignee | ||
Comment 5•24 years ago
|
||
Hi Johnny,
could I have a sr for this one?
Thanx
Axel
Status: NEW → ASSIGNED
Comment 6•24 years ago
|
||
I appologize for the delay here, I've been swamped with bugzilla mails lately
and didn't see this until now...
sr=jst
Assignee | ||
Comment 7•24 years ago
|
||
fix checked in, axel
Status: ASSIGNED → RESOLVED
Closed: 24 years ago
Resolution: --- → FIXED
You need to log in
before you can comment on or make changes to this bug.
Description
•