[Webkit-unassigned] [Bug 13785] Counters exhibit O(n^2) creation/destruction behavior

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Sat May 19 02:59:56 PDT 2007


http://bugs.webkit.org/show_bug.cgi?id=13785





------- Comment #4 from hyatt at apple.com  2007-05-19 02:59 PDT -------
The two loops should be combined.

The second loop (the one that does the previous in pre-order walk) should be
modified and used to also find the reset node.  While walking backwards in
pre-order, look for any counter-increment or counter-reset counters.  If you
hit an increment node before hitting any reset node, then you have both your
previous counter node and your parent counter node (by just geting the
increment's parent). 

At the same time this backwards pre-order walk is being done, track the next
previous sibling or parent (as the first loop was doing).  Refuse to look at
any increment nodes if you hit a reset before hitting the next previous sibling
or parent candidate.  Once you hit that next candidate, you can safely look at
increment nodes again as far as using them to find the reset.


-- 
Configure bugmail: http://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.



More information about the webkit-unassigned mailing list