Skip to content
Commit 6f11bb64 authored by Ana SollanoKim's avatar Ana SollanoKim Committed by Chromium LUCI CQ
Browse files

[GridNG] |GridChildIterator| deletion

In this change, |GridChildIterator| is deleted due to several reasons:

1. It was creating an extra call to iterate over grid's children, which
resulted in being redundant given that |ConstructAndAppendGridItems|
also does that.
2. Stored grid's children in a vector, only to move those elements to
|grid_items|.
3. It was only called once.

Instead, the logic was moved to |ConstructAndAppendGridItems|. There, we
iterate over the grid's children and sort them (if necessary) directly
in the vector |item_data|. No new tests were added given that
grid-inline-order-property-auto-placement-*.html,
grid-inline-order-property-painting-*.html,
grid-order-property-auto-placement-*.html, and
grid-order-property-painting-*.html already test this behavior.

Perf deltas:
fixed-grid-lots-of-data.html
avg 83.60192376722262 runs/s -> 86.51449763477322 runs/s (3.48% better)

fixed-grid-lots-of-stretched-data.html
avg 81.30339558654433 runs/s -> 86.34667687450617 runs/s (6.2% better)

auto-grid-lots-of-spanning-data.html
avg 169.05416025775412 runs/s -> 176.64471239176206 runs/s (4.49% better)

nested-grid.html
avg 571.8424931622051 runs/s -> 635.0586262416913 runs/s (11.05% better)

large-grid.html
avg 2.1408513903127084 runs/s -> 2.2210431921964147 runs/s (3.74% better)

Bug: 1045599, 1218290
Change-Id: I3a0fdabdbd3d850543c44ac4cdadaf86b7a74215
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2992737


Commit-Queue: Ana Sollano Kim <ansollan@microsoft.com>
Reviewed-by: default avatarEthan Jimenez <ethavar@microsoft.com>
Reviewed-by: default avatarKurt Catti-Schmidt <kschmi@microsoft.com>
Reviewed-by: default avatarIan Kilpatrick <ikilpatrick@chromium.org>
Cr-Commit-Position: refs/heads/master@{#898407}
parent af8ae05b
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment