Files
firefox/testing/web-platform/tests/css/css-grid/alignment/support
Javier Fernandez d716a9b9e3 Bug 1488291 [wpt PR 12816] - [css-grid] Performance optimizations in the Baseline alignment code, a=testonly
Automatic update from web-platform-tests[css-grid] Performance optimizations in the Baseline alignment code

Since we integrated the baseline alignment logic in the grid tracks
sizing algorithm, its impact on performance has grown considerably.

The analysis of the new logic added and its overhead, due to different
operations, shows that evaluating the item's participation in the
baseline alignment context is the most expensive one. It's specially
demanding the evaluation of the grid item's alignment properties.

Considering that currently we are doing this for every grid item, this
CL propose to reuse the loop we already have to clear the grid item's
override size to cache the items with a baseline value in their
alignment CSS properties.

Thanks to this cache we can determine the item's participation in a
baseline alignment context in the different phases of the track sizing
algorithm, with almost no cost (compared to the current logic). It may
be possible to share the cache with the algorithm run for computing the
grid's intrinsic size; however, if the intrinsic size logic is run
before the grid's layout, we'll end up duplicating the cache.

Additionally, this cache is also used in the alignment phase of the
grid layout logic; this change helps to avoid the various issues we
have been suffering related to the different evaluations of the item's
participation in baseline during the different phases of the grid
layout algorithm.

BUG = 873452

Change-Id: Ida27be11ae0f5c455e6077367a277981ab35cec1
Reviewed-on: https://chromium-review.googlesource.com/1179897
Commit-Queue: Javier Fernandez <[email protected]>
Reviewed-by: Manuel Rego <[email protected]>
Cr-Commit-Position: refs/heads/master@{#593552}

--

wpt-commits: f6de5f7d5d50b1ad30a1e17922e183868fd3e935
wpt-pr: 12816
2018-09-28 15:47:42 +00:00
..