Closed Bug 1201692 Opened 6 years ago Closed 6 years ago
Child Iterator::Seek leads to O(N^2) behavior during frame reconstruction
This is basically a regression from bug 653881. I should have caught it then in review... The old seek() call on the ChildIterator in FindInsertionPrevSibling was O(1) in the common case. But the new Seek() call on ExplicitChildIterator is O(N) in all cases, since it always does a walk along all the kids until it gets to the one we want. We should be able to fast-path at least the common case here, I'd think: that aChildToFind is a child of mParent. In that case, can't we just set mChild to aChildToFind and return?
This speeds up the testcase by 30% or so
Attachment #8656961 - Flags: review?(wchen)
Assignee: nobody → bzbarsky
Status: NEW → ASSIGNED
Try push at https://treeherder.mozilla.org/#/jobs?repo=try&revision=5eabce5e52ac looks good to me.
You need to log in before you can comment on or make changes to this bug.