Skip a flex item's content size suggestion when its positive specified size suggestion is no larger than its already resolved flex base size. Use the specified suggestion capped by the maximum main size when flex-shrink is zero, or when the item's outer s
Categories
(Core :: Layout: Flexbox, defect)
Tracking
()
People
(Reporter: perf-ai-bot, Unassigned)
References
(Blocks 1 open bug)
Details
(Whiteboard: [foofrix:d6e6ff54-ada1-459d-b025-09d055bb8aec])
Attachments
(1 external file)
Skip a flex item's content size suggestion when its positive specified size suggestion is no larger than its already resolved flex base size. Use the specified suggestion capped by the maximum main size when flex-shrink is zero, or when the item's outer specified size fits the container's definite tentative main size and the container wraps or has one non-placeholder child. The fit calculation includes main-axis margins, border and padding using 64-bit addition. Exclude preferred aspect ratios, fragmented containers, DevTools flex-information requests, and block-axis flex bases that still require measurement. Inline-axis bases already resolved through content measurement remain eligible. This avoids a block-axis measuring reflow or an additional inline-axis min-content ComputeSize call. WPT coverage checks box edges, sizing constraints, percentages, wrapping, nested columns, orthogonal writing modes and inflexible items.
Problem
Timeline-Mithril nests single-child column flex containers with percentage heights. Resolving automatic minimum sizes can measure descendant content before final reflow, repeatedly traversing nested subtrees. The author attributed about 22% of main-thread time to these measurements and reported iteration time improving from roughly 1525 ms to 1272 ms, with score increasing from 4.45 to 4.49 runs/min. Those measurements used an earlier fit check that omitted border and padding. The targeted containers reportedly have no main-axis box edges, so the corrected shortcut is expected to remain applicable, but its performance gain has not been remeasured.
Performance
- Benchmark: speedometer4
- Test: sp4-full
- Component: Layout
- Local Improvement: 0.82%
Validation
| Reporter | ||
Updated•1 month ago
|
| Reporter | ||
Comment 1•1 month ago
|
||
Please move this bug to the correct component.
Once the Phabricator patch is ready for review, please commandeer it.
| Reporter | ||
Comment 2•1 month ago
|
||
Skip a flex item's content size suggestion when its positive specified size suggestion is no larger than its already resolved flex base size. Use the specified suggestion capped by the maximum main size when flex-shrink is zero, or when the item's outer s
Updated•1 month ago
|
Updated•1 month ago
|
Description
•