WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
129298
Optimize RenderTable::colToEffCol() for tables without colspans
https://bugs.webkit.org/show_bug.cgi?id=129298
Summary
Optimize RenderTable::colToEffCol() for tables without colspans
Laszlo Vidacs
Reported
2014-02-25 04:19:12 PST
colToEffCol() is very hot in tables with collapsed borders and it is a very expensive function which iterates through every column in the table up to the current one. But it only needs to do this when the table's list of columns contains one whose colspan exceeds the width of the table, as that is the only situation in which |ColumnStruct| will still have a span. (See RenderTableSection:addCell() where the span is redistributed among other columns in the table during a second pass of the table.) Create a fast path for colToEffCol() and effColToCol() that avoids iterating through every column unless the |m_columns| vector still has a |ColumnStruct| with a span. The slow path is extremely rare and probably not worth optimizing for, as it only applies to tables where a cell has a colspan that exceeds the total number of columns provided by other rows in the table. Blink merge candidate from
https://chromium.googlesource.com/chromium/blink/+/dba71c7c3b953ef88b640bf32fa657fd2ebe4c63
by
robhogan@gmail.com
Attachments
Patch
(10.72 KB, patch)
2014-03-03 08:42 PST
,
Laszlo Vidacs
no flags
Details
Formatted Diff
Diff
View All
Add attachment
proposed patch, testcase, etc.
Laszlo Vidacs
Comment 1
2014-03-03 08:42:19 PST
Created
attachment 225656
[details]
Patch
Laszlo Vidacs
Comment 2
2014-03-04 07:35:59 PST
I made some performance measurements with the new test. Tests are extreme cases, but even on a virtual machine I could measure the difference (efl port): collapsed-borders-and-no-colspans:
r164983
: ~1700ms
r164983
-with-patch: ~620 - ~64% better collapsed-borders-and-colspans:
r164983
: ~1710ms
r164983
-with-patch: ~640 - ~62% better collapsed-borders-and-colspans-wider-than-table:
r164983
: ~1740ms
r164983
-with-patch: ~1710 - about the same
WebKit Commit Bot
Comment 3
2014-03-20 16:16:56 PDT
Comment on
attachment 225656
[details]
Patch Clearing flags on attachment: 225656 Committed
r166016
: <
http://trac.webkit.org/changeset/166016
>
WebKit Commit Bot
Comment 4
2014-03-20 16:17:01 PDT
All reviewed patches have been landed. Closing bug.
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug