Open Bug 1443066 Opened 8 years ago Updated 3 years ago

Try to understand why we're slower than Chrome on StyleBench "Positional pseudo classes : Adding leaf elements: Async" (& similar "Removing" measurement)

Categories

(Core :: CSS Parsing and Computation, defect, P3)

57 Branch
defect

Tracking

()

Performance Impact medium
Tracking Status
firefox61 --- affected

People

(Reporter: dholbert, Unassigned)

References

(Blocks 1 open bug)

Details

(Keywords: perf, perf:responsiveness)

See StyleBench results in bug 1425058 Comment 26 -- we're slower than Chrome on one of the larger sets of measurements there: Stylo with privacy.reduceTimerPrecision=false and STYLO_THREADS=1 (revision: https://hg.mozilla.org/mozilla-central/rev/190b536928f8) Positional pseudo classes : Adding leaf elements : Async: 125.42000000000007 ms Positional pseudo classes : Removing leaf elements : Async: 120.69999999999982 ms Chromium (revision: https://chromium.googlesource.com/chromium/src/+/a8768c2cd0aea923b6ee86077e3b608518b44e2d) Positional pseudo classes : Adding leaf elements : Async: 99.50000000026193 ms Positional pseudo classes : Removing leaf elements : Async: 95.5999999996493 ms For both measurements, our time is about 26% longer than Chrome's. This seems like the main piece of StyleBench where we're significantly behind, at the moment. Hence, I'm spinning this bug off to cover investigating these metrics & seeing if there are any wins we can get here.
Optimization of positional pseudo-classes is generally just the NthIndexCache, and IIRC we have a different cache strategy than Chrome. It is possible that their cache strategy is better than ours.
Well, right now our handling of dom mutations on something that has :nth-child is just restyling the whole subtree, which is... not great.
See Also: → 1406622
I dumped my thoughts on how to fix this in bug 1406622 comment 2.
Whiteboard: [qf] → [qf:p1][qf:f61]
Priority: -- → P3
Whiteboard: [qf:p1][qf:f61] → [qf:p1][qf:f64]
Whiteboard: [qf:p1][qf:f64] → [qf:p1:f64]
See Also: → 1480477
Whiteboard: [qf:p1:f64] → [qf:p2:responsiveness]
Blocks: 501848
Performance Impact: --- → P2
Whiteboard: [qf:p2:responsiveness]
Severity: normal → S3
You need to log in before you can comment on or make changes to this bug.