Stylo incrementally cascades eligible style-attribute-only restyles: it derives the element's primary style from its previous computed values and applies only the changed inline declarations. Eligibility requires an unchanged declaration count and propert
Categories
(Core :: CSS Parsing and Computation, defect, P3)
Tracking
()
People
(Reporter: perf-ai-bot, Unassigned)
References
(Blocks 1 open bug)
Details
(Whiteboard: [foofrix:08c492fb-f142-486f-be4e-52dd6507bc6d])
Attachments
(1 external file)
Stylo incrementally cascades eligible style-attribute-only restyles: it derives the element's primary style from its previous computed values and applies only the changed inline declarations. Eligibility requires an unchanged declaration count and property order, no !important declarations, and the style attribute as the highest-priority rule, so no animation, transition, SMIL, ::part() or !important rule overrides it. The element's own zoom property must also compute to 1; zoomed ancestors are allowed. Changed declarations must be physical insets, width or height, or physical margins with length-percentage or auto values, or pointer-events, z-index, transform, translate, rotate or scale. The full cascade is used instead for other new values, for a changed physical declaration followed by a logical declaration of the same group, and for root elements, pseudo-elements, visited styles, restyle hints beyond the style attribute and descendant bits, cascade flags, and forced colors. Unchanged style structs and conservative dependency flags are kept, and eager pseudo-elements are cascaded normally. Performance was not remeasured during this audit.
Problem
Repeated inline left and top updates, such as the reported Timeline-Mithril FilterByCategory workload, already skip selector matching. The full cascade still walks every matched declaration and rebuilds the declared style structs, because a new inline block with reset properties creates a new rule node and the rule cache normally misses. Reusing the previous computed style for eligible updates targets this cascade and allocation work. The supplied performance figures, hit-rate claim, and page-cache explanation were not independently verified.
Performance
- Benchmark: speedometer4
- Test: sp4-full
- Component: Layout
- Local Improvement: 1.82%
Validation
| Reporter | ||
Updated•13 days ago
|
| Reporter | ||
Comment 1•13 days ago
|
||
Please move this bug to the correct component.
Once the Phabricator patch is ready for review, please commandeer it.
| Reporter | ||
Comment 2•13 days ago
|
||
Stylo incrementally cascades eligible style-attribute-only restyles: it derives the element's primary style from its previous computed values and applies only the changed inline declarations. Eligibility requires an unchanged declaration count and propert
Comment 3•7 days ago
|
||
Optimize eligible inline style updates by incrementally cascading changed declarations. Since this is for sp4, need to check if this workload is likely to make it into the production before more work is done on it.
Updated•6 days ago
|
Description
•