30.92 - 6.12% perf_reftest_singletons bloom-basic-2.html + 7 more (Linux, OSX, Windows) regression on Thu August 27 2026
Categories
(Core :: CSS Parsing and Computation, defect)
Tracking
()
| Tracking | Status | |
|---|---|---|
| firefox-esr140 | --- | unaffected |
| firefox-esr153 | --- | unaffected |
| firefox155 | --- | unaffected |
| firefox156 | --- | disabled |
| firefox157 | --- | fixed |
People
(Reporter: performance-sheriff-bot, Assigned: emilio)
References
(Regression)
Details
(4 keywords)
Attachments
(2 files, 1 external file, 1 obsolete file)
Perfherder has detected a talos performance regression from push dba49edca099917d2a2e8fd87478e4404d999f57. As author of one of the patches included in that push, we need your help to address this regression.
Please acknowledge, and begin investigating this alert within 3 business days, or the patch(es) may be backed out in accordance with our regression policy.
| Regression | Test | Platform | Options | Absolute values [old vs new] |
|---|---|---|---|---|
| 31% | perf_reftest_singletons bloom-basic-2.html (doc) | linux2404-64-shippable | e10s fission stylo webrender | 37.72 ms -> 49.38 ms |
| 31% | perf_reftest_singletons bloom-basic.html (doc) | linux2404-64-shippable | e10s fission stylo webrender | 37.59 ms -> 49.08 ms |
| 30% | perf_reftest_singletons attr-selector-1.html (doc) | windows11-64-24h2-shippable | e10s fission stylo webrender | 47.25 ms -> 61.65 ms |
| 17% | perf_reftest_singletons bloom-basic-2.html (doc) | windows11-64-24h2-shippable | e10s fission stylo webrender | 19.56 ms -> 22.90 ms |
| 17% | perf_reftest_singletons bloom-basic.html (doc) | windows11-64-24h2-shippable | e10s fission stylo webrender | 19.67 ms -> 22.95 ms |
| 14% | perf_reftest_singletons parent-basic-singleton.html (doc) | windows11-64-24h2-shippable | e10s fission stylo webrender | 36.52 ms -> 41.78 ms |
| 10% | perf_reftest_singletons bloom-basic.html (doc) | macosx1470-64-shippable | e10s fission stylo webrender | 39.18 ms -> 43.10 ms |
| 6% | perf_reftest_singletons many-custom-props.html (doc) | macosx1470-64-shippable | e10s fission stylo webrender | 221.37 ms -> 234.92 ms |
Support & Actionable Steps
For questions, please contact afinder@mozilla.com. You can also find help on Slack (#perf-help) or Matrix (#perftest).
Action guide details:
- See the guide to handling regression bugs for investigation steps.
- Review the alert summary for affected tests, graphs, and comparisons.
- Check the PerfCompare results.
- Tests on Try: Run all tests using
./mach try perf --alert 52444(See documentation link for details). - Test locally: To run the tests locally use
./mach perftest 52444 - Profiling jobs: Trigger jobs from Treeherder job view or request them from afinder@mozilla.com.
Comment 1•2 months ago
|
||
Set release status flags based on info from the regressing bug 2048847
| Assignee | ||
Comment 2•2 months ago
|
||
| Assignee | ||
Comment 3•2 months ago
|
||
Ok so I understand what's going on. The Subject path is confusing LLVM a bit. Since selectors takes a reference it grows the inner loop hot path substantially in Rule::matches_selector.
I have a simple approach that restores the performance. But that made me think that maybe we should just make selectors take the elements by value, maybe even going all the way to force selectors::Element to be Copy... And that indeed also squeezes a bit more performance.
We can probably keep the Clone bound for convenience if you're doing something not very performance sensitive...
Nico, any objection to just switching selectors to require E by value? in its public API surface? IIRC you're consuming the crate downstream. It would require some clones upfront if your elements aren't cheap (but tbh if you're doing selector-matching you probably can / want the elements to be Copy / a lightweight reference.
Oriol, this was a bit annoying for Gecko because of the snapshotting stuff (but nothing too crazy). Just double-checking that Servo doesn't have a more complicated mechanism / other selectors::Element implementations that would make this a lot more painful / intractable?
| Assignee | ||
Comment 4•2 months ago
|
||
| Assignee | ||
Comment 5•2 months ago
|
||
| Assignee | ||
Comment 6•2 months ago
|
||
The issue seems to be that since we're passing element by value, and
mutating, but then passing it by reference around to selectors llvm adds
a stack-to-stack copy of the element per iteration, which grows this
super-hot loop enough.
Measured locally, but try push imminent.
Updated•2 months ago
|
| Assignee | ||
Comment 7•2 months ago
|
||
For comment 6:
- Alert: https://perf.compare/compare-lando-results?landoInstance=lando-prod-2025&baseLando=86813&newLando=86814&baseRepo=try&newRepo=try&framework=1
- Stylebench: https://perf.compare/compare-lando-results?landoInstance=lando-prod-2025&baseLando=86815&newLando=86816&baseRepo=try&newRepo=try&framework=13
- Sp3: https://perf.compare/compare-lando-results?landoInstance=lando-prod-2025&baseLando=86817&newLando=86818&baseRepo=try&newRepo=try&framework=13
| Assignee | ||
Comment 8•2 months ago
|
||
Removes some unnecessary indirection. Locally this recovers the
regression, and then some.
We could keep the Clone bound if needed / avoid Copy. It's just a bit
annoying tho.
| Assignee | ||
Comment 9•2 months ago
|
||
For comment 8:
- Alert: https://perf.compare/compare-lando-results?landoInstance=lando-prod-2025&baseLando=86813&newLando=86824&baseRepo=try&newRepo=try&framework=1
- Stylebench: https://perf.compare/compare-lando-results?landoInstance=lando-prod-2025&baseLando=86815&newLando=86825&baseRepo=try&newRepo=try&framework=13
- Sp3: https://perf.compare/compare-lando-results?landoInstance=lando-prod-2025&baseLando=86817&newLando=86826&baseRepo=try&newRepo=try&framework=13
Comment 10•2 months ago
|
||
Our selectors::Element impl in Blitz is on &'a Node (i.e. a reference to our DOM Node type). So I think Copy should be fine (& references are trivially Copy) so long as 'static isn't required. Indeed, it seems like a nice improvement as it will mean we're not passing a double-reference (I guess probably with current selectors we ought to be implementing the trait directly on Node, with the proposed setup our current impl will be correct).
See: https://github.com/DioxusLabs/blitz/blob/main/packages/blitz-dom/src/stylo.rs#L317
(probably at some point we'll impl this on a private newtype wrapper so we can keep our Stylo impls private, but I don't think that affects anything here)
Comment 11•2 months ago
|
||
| Assignee | ||
Comment 12•2 months ago
|
||
So comment 9 is a lot more mixed than I expected, probably due to the ElementWrapper eager snapshot lookup...
Comment 13•2 months ago
|
||
The regressor Bug 2048847 was reverted from Fx156 beta
Comment 14•2 months ago
|
||
| bugherder | ||
Comment 15•2 months ago
|
||
Comment on attachment 9635609 [details]
Bug 2068601 - Make selector matching pass elements by value. r=#style
Revision D323074 was moved to bug 2069004. Setting attachment 9635609 [details] to obsolete.
| Reporter | ||
Comment 16•2 months ago
|
||
Perfherder has detected a talos performance change from push aeb5b9469c52f226708d853614c5f0d52e9aa41b.
No action is required from the author; this comment is provided for informational purposes only.
| Improvement | Test | Platform | Options | Absolute values [old vs new] |
|---|---|---|---|---|
| 13% | perf_reftest_singletons bloom-basic.html (doc) | linux2404-64-shippable | e10s fission stylo webrender | 48.50 ms -> 42.42 ms |
| 11% | perf_reftest_singletons bloom-basic-2.html (doc) | linux2404-64-shippable | e10s fission stylo webrender | 47.76 ms -> 42.42 ms |
Need Help or Information?
If you have any questions, please reach out to afinder@mozilla.com. Alternatively, you can find help on Slack by joining #perf-help, and on Matrix you can find help by joining #perftest.
Details of the alert can be found in the alert summary, including links to graphs and comparisons for each of the affected tests.
Updated•2 months ago
|
Comment 17•1 month ago
|
||
No problem for Servo from this or bug 2069004.
Description
•