Improve the performance when generating FlexLines for flex container's non-first-in-flows
Categories
(Core :: Layout: Flexbox, task, P1)
Tracking
()
Tracking | Status | |
---|---|---|
firefox78 | --- | fixed |
People
(Reporter: TYLin, Assigned: TYLin)
References
Details
Attachments
(3 files)
Per dholbert's review comment, the way we generate FlexLines for flex container's non-first-in-flows has the worst-case performance of O(n^3)
where n
is the number of flex items.
We should improve the performance.
Assignee | ||
Comment 1•5 years ago
|
||
This will be my next todo after bug 1622935 landed.
Assignee | ||
Comment 2•5 years ago
|
||
By changing the FlexLines and FlexItems generated in flex container's
first-in-flow in CSS "order" aware order (i.e. reverse them again if the
flex container's internal axes are reversed), we can construct FlexItems
for flex container's next-in-flows in linear time because once we find a
FlexItem in the stored FlexLines via FlexItemIterator to construct a new
FlexItem for a child frame, the FlexItem for the next child frame can
only be found in a later entry (either in a later item in the same line,
or an item in a later line).
Depends on D75154
Assignee | ||
Comment 3•5 years ago
|
||
Depends on D75155
Assignee | ||
Comment 4•5 years ago
|
||
Updated•5 years ago
|
Comment 6•5 years ago
|
||
bugherder |
https://hg.mozilla.org/mozilla-central/rev/ad89f466d991
https://hg.mozilla.org/mozilla-central/rev/dfd3e63d3371
https://hg.mozilla.org/mozilla-central/rev/2924b52f3b3f
Description
•