DescriptionOptimize RenderTable::colToEffCol() for tables without colspans
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.
Committed: https://src.chromium.org/viewvc/blink?view=rev&revision=167120
Patch Set 1 #Patch Set 2 : Updated #Patch Set 3 : Updated #Patch Set 4 : Updated #
Total comments: 1
Patch Set 5 : Updated #
Messages
Total messages: 12 (0 generated)
|