Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(7)

Issue 154243002: Optimize RenderTable::colToEffCol() for tables without colspans (Closed)

Created:
6 years, 10 months ago by rhogan
Modified:
6 years, 10 months ago
CC:
blink-reviews, bemjb+rendering_chromium.org, dsinclair, zoltan1, eae+blinkwatch, leviw+renderwatch, jchaffraix+rendering
Visibility:
Public.

Description

Optimize 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 #

Unified diffs Side-by-side diffs Delta from patch set Stats (+112 lines, -0 lines) Patch
A PerformanceTests/Layout/large-table-with-collapsed-borders-and-colspans.html View 1 2 3 4 1 chunk +15 lines, -0 lines 0 comments Download
A PerformanceTests/Layout/large-table-with-collapsed-borders-and-colspans-wider-than-table.html View 1 2 3 4 1 chunk +15 lines, -0 lines 0 comments Download
A PerformanceTests/Layout/large-table-with-collapsed-borders-and-no-colspans.html View 1 2 3 4 1 chunk +15 lines, -0 lines 0 comments Download
A PerformanceTests/Layout/resources/large-table-with-collapsed-borders.css View 1 1 chunk +14 lines, -0 lines 0 comments Download
A PerformanceTests/Layout/resources/large-table-with-collapsed-borders.js View 1 2 3 4 1 chunk +32 lines, -0 lines 0 comments Download
M Source/core/rendering/RenderTable.h View 1 2 3 chunks +15 lines, -0 lines 0 comments Download
M Source/core/rendering/RenderTable.cpp View 1 2 3 chunks +6 lines, -0 lines 0 comments Download

Messages

Total messages: 12 (0 generated)
rhogan
6 years, 10 months ago (2014-02-11 20:25:02 UTC) #1
Julien - ping for review
lgtm, FYI I expect the performance of the collapsed border code to be just terrible. ...
6 years, 10 months ago (2014-02-12 23:05:44 UTC) #2
rhogan
The CQ bit was checked by robhogan@gmail.com
6 years, 10 months ago (2014-02-13 20:58:14 UTC) #3
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/robhogan@gmail.com/154243002/300001
6 years, 10 months ago (2014-02-13 20:58:22 UTC) #4
eseidel
The CQ bit was unchecked by eseidel@chromium.org
6 years, 10 months ago (2014-02-13 21:02:14 UTC) #5
eseidel
The CQ bit was checked by eseidel@chromium.org
6 years, 10 months ago (2014-02-13 21:02:15 UTC) #6
eseidel
lgtm Hmm. I remember working a bunch on this code when optimizing tests from https://github.com/dglazkov/performance-tests ...
6 years, 10 months ago (2014-02-13 21:03:40 UTC) #7
commit-bot: I haz the power
The CQ bit was unchecked by commit-bot@chromium.org
6 years, 10 months ago (2014-02-13 23:22:28 UTC) #8
commit-bot: I haz the power
Commit queue rejected this change because the description was changed between the time the change ...
6 years, 10 months ago (2014-02-13 23:22:29 UTC) #9
rhogan
The CQ bit was checked by robhogan@gmail.com
6 years, 10 months ago (2014-02-13 23:28:31 UTC) #10
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/robhogan@gmail.com/154243002/300001
6 years, 10 months ago (2014-02-13 23:28:47 UTC) #11
commit-bot: I haz the power
6 years, 10 months ago (2014-02-13 23:29:08 UTC) #12
Message was sent while issue was closed.
Change committed as 167120

Powered by Google App Engine
This is Rietveld 408576698