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

Issue 2339983002: [css-grid] Remove the 2x computation of row sizes w/ indefinite heights (Closed)

Created:
4 years, 3 months ago by svillar
Modified:
4 years, 3 months ago
CC:
chromium-reviews, jfernandez, szager+layoutwatch_chromium.org, zoltan1, blink-reviews-layout_chromium.org, pdr+renderingwatchlist_chromium.org, Manuel Rego, leviw+renderwatch, jchaffraix+rendering, blink-reviews, eae+blinkwatch
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

[css-grid] Remove the 2x computation of row sizes w/ indefinite heights On crrev.com/358816, among other things, we added a second pass of the track sizing algorithm for rows in order to properly compute row sizes when the height was indefinite. We did that in order to have a symmetrical implementation for columns and rows, but unfortunatelly that was not correct. Apart from issuing incorrect results in some cases it created a huge performance issue in the case of nested grids because we were exponentially increasing the amount of executions of the track sizing algorithm. The attached performance test shows a 350% improvement with the patch. BUG=619629 Committed: https://crrev.com/7eeda9249ff7a744d713417830e4b71319879b87 Cr-Commit-Position: refs/heads/master@{#418892}

Patch Set 1 #

Patch Set 2 : Now with perf test #

Total comments: 3

Patch Set 3 : Patch for landing #

Patch Set 4 : Rebased patch for landing #

Patch Set 5 : Rebased patch for landing v2 #

Total comments: 1
Unified diffs Side-by-side diffs Delta from patch set Stats (+368 lines, -23 lines) Patch
M third_party/WebKit/LayoutTests/fast/css-grid-layout/maximize-tracks-definite-indefinite-height.html View 7 chunks +16 lines, -16 lines 0 comments Download
A third_party/WebKit/PerformanceTests/Layout/nested-grid.html View 1 1 chunk +347 lines, -0 lines 1 comment Download
M third_party/WebKit/Source/core/layout/LayoutGrid.cpp View 1 2 3 4 4 chunks +5 lines, -7 lines 0 comments Download

Messages

Total messages: 24 (11 generated)
svillar
Sending out for review
4 years, 3 months ago (2016-09-14 18:51:27 UTC) #2
jfernandez
I like the change and it indeed simplifies the tracks sizing logic considerably. LGTM https://codereview.chromium.org/2339983002/diff/20001/third_party/WebKit/Source/core/layout/LayoutGrid.cpp ...
4 years, 3 months ago (2016-09-14 21:54:46 UTC) #4
eae
LGTM
4 years, 3 months ago (2016-09-14 22:06:38 UTC) #5
svillar
Thanks for the review. https://codereview.chromium.org/2339983002/diff/20001/third_party/WebKit/Source/core/layout/LayoutGrid.cpp File third_party/WebKit/Source/core/layout/LayoutGrid.cpp (right): https://codereview.chromium.org/2339983002/diff/20001/third_party/WebKit/Source/core/layout/LayoutGrid.cpp#newcode1893 third_party/WebKit/Source/core/layout/LayoutGrid.cpp:1893: sizingData.sizingOperation = TrackSizing; On 2016/09/14 ...
4 years, 3 months ago (2016-09-15 10:04:34 UTC) #6
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2339983002/40001
4 years, 3 months ago (2016-09-15 11:48:06 UTC) #9
commit-bot: I haz the power
Try jobs failed on following builders: mac_chromium_compile_dbg_ng on master.tryserver.chromium.mac (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.mac/builders/mac_chromium_compile_dbg_ng/builds/269104) mac_chromium_rel_ng on master.tryserver.chromium.mac (JOB_FAILED, ...
4 years, 3 months ago (2016-09-15 11:50:26 UTC) #11
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2339983002/80001
4 years, 3 months ago (2016-09-15 13:14:06 UTC) #14
commit-bot: I haz the power
Try jobs failed on following builders: win_chromium_rel_ng on master.tryserver.chromium.win (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.win/builders/win_chromium_rel_ng/builds/293762)
4 years, 3 months ago (2016-09-15 14:27:28 UTC) #16
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2339983002/80001
4 years, 3 months ago (2016-09-15 14:42:38 UTC) #18
commit-bot: I haz the power
Committed patchset #5 (id:80001)
4 years, 3 months ago (2016-09-15 17:15:34 UTC) #20
commit-bot: I haz the power
Patchset 5 (id:??) landed as https://crrev.com/7eeda9249ff7a744d713417830e4b71319879b87 Cr-Commit-Position: refs/heads/master@{#418892}
4 years, 3 months ago (2016-09-15 17:17:51 UTC) #22
Manuel Rego
A small comment about the performance test. https://codereview.chromium.org/2339983002/diff/80001/third_party/WebKit/PerformanceTests/Layout/nested-grid.html File third_party/WebKit/PerformanceTests/Layout/nested-grid.html (right): https://codereview.chromium.org/2339983002/diff/80001/third_party/WebKit/PerformanceTests/Layout/nested-grid.html#newcode43 third_party/WebKit/PerformanceTests/Layout/nested-grid.html:43: <div class='gridItem' ...
4 years, 3 months ago (2016-09-16 04:57:41 UTC) #23
svillar
4 years, 3 months ago (2016-09-16 11:16:28 UTC) #24
Message was sent while issue was closed.
On 2016/09/16 04:57:41, Manuel Rego wrote:
> A small comment about the performance test.
> 
>
https://codereview.chromium.org/2339983002/diff/80001/third_party/WebKit/Perf...
> File third_party/WebKit/PerformanceTests/Layout/nested-grid.html (right):
> 
>
https://codereview.chromium.org/2339983002/diff/80001/third_party/WebKit/Perf...
> third_party/WebKit/PerformanceTests/Layout/nested-grid.html:43: <div
> class='gridItem' style='grid-area: 1 / 1; background-color: rgb(36, 100,
> 135)'></div>
> "gridItem" class is not defined.
> 
> Wouldn't be better set a specific size for the items,
> like we do in other tests?
> 
> Otherwise all the columns and rows of this grid will have
> a 0px breadth.

Tracks are all flex so the maximum does not depend on that.

Powered by Google App Engine
This is Rietveld 408576698