[Webkit-unassigned] [Bug 13351] O(N^2) behavior seen when parsing, rendering, and destroying nested tags

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Sat Apr 14 16:57:00 PDT 2007


------- Comment #3 from hyatt at apple.com  2007-04-14 16:56 PDT -------
Some comments on each case:

(1) The nested span case is going to result in orders of magnitude more line
boxes.  If you nest to an extreme depth, then every line will have a gigantic
nesting level.

It should be possible to collapse together nested spans with identical styles
and line box positions (e.g., if one span's ypos and height precisely match its
enclosing span's ypos and height) and that would not do any painting of their
own, but this change would obviously be involved and highly dangerous.

That's how I would attack the problem though... avoid constructing line boxes
for spans that would not have painted anything and that have a positioning and
style that is identical to their parent inlines.

(2) Nested divs (I assume there is content in each div like text) would result
in a lot of anonymous blocks being made to enclose text.  Nothing comes to mind
regarding fixing it other than the hope that something obvious shows up on
profiles.  This behavior should not be O(n^2), so if it is, something is going

(3) Doing block - inline - block - inline is going to be the hardest one to
fix.  The rendering contortions are necessary, but maybe profiling will show
areas for improvement.

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