Closed Bug 1991689 Opened 17 days ago Closed 12 days ago

1167.55 - 5.17% perf_reftest_singletons svg-text-textLength-1.html / perf_reftest_singletons thai-reflow.html + 10 more (Linux, OSX, Windows) regression on Tue September 23 2025

Categories

(Core :: Layout: Text and Fonts, defect, P3)

defect
Points:
1

Tracking

()

RESOLVED FIXED
145 Branch
Tracking Status
firefox-esr140 --- unaffected
firefox143 --- unaffected
firefox144 --- unaffected
firefox145 --- fixed

People

(Reporter: intermittent-bug-filer, Assigned: jfkthame)

References

(Regressed 3 open bugs, Regression)

Details

(4 keywords, Whiteboard: [jp-mvp])

Attachments

(2 files)

Perfherder has detected a talos performance regression from push ff7bf296a64e46a6e33cc3cd0ebe683d8ae8556f. 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. Our guide to handling regression bugs has information about how you can proceed with this investigation.

If you have any questions or need any help with the investigation, 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.

Regressions:

Ratio Test Platform Options Absolute values (old vs new)
1168% perf_reftest_singletons svg-text-textLength-1.html macosx1470-64-shippable e10s fission stylo webrender 1,428.31 -> 18,104.47
1036% perf_reftest_singletons svg-text-textLength-1.html linux1804-64-shippable-qr e10s fission stylo webrender 1,315.87 -> 14,953.32
513% perf_reftest_singletons svg-text-textLength-1.html windows11-64-24h2-shippable e10s fission stylo webrender 1,423.46 -> 8,724.13
21% perf_reftest_singletons resize-lengthy-textarea.html macosx1470-64-shippable e10s fission stylo webrender 134.58 -> 162.93
17% perf_reftest_singletons bidi-resolution-1.html linux1804-64-shippable-qr e10s fission stylo webrender 209.28 -> 244.37
14% perf_reftest_singletons bidi-resolution-1.html windows11-64-24h2-shippable e10s fission stylo webrender 68.94 -> 78.52
13% perf_reftest_singletons resize-lengthy-textarea.html linux1804-64-shippable-qr e10s fission stylo webrender 156.01 -> 175.67
11% perf_reftest_singletons resize-lengthy-textarea.html windows11-64-24h2-shippable e10s fission stylo webrender 103.02 -> 114.68
11% perf_reftest_singletons insert-subtree-not-nth-edge-has-pseudo.html macosx1470-64-shippable e10s fission stylo webrender 14.75 -> 16.31
6% perf_reftest_singletons thai-reflow.html macosx1470-64-shippable e10s fission stylo webrender 75.76 -> 80.67
5% perf_reftest_singletons thai-reflow.html linux1804-64-shippable-qr e10s fission stylo webrender 73.47 -> 77.29
5% perf_reftest_singletons thai-reflow.html windows11-64-24h2-shippable e10s fission stylo webrender 30.69 -> 32.27

Improvements:

Ratio Test Platform Options Absolute values (old vs new)
12% perf_reftest_singletons remove-children-positional-2.html windows11-64-24h2-shippable e10s fission stylo webrender 130.13 -> 114.08

Details of the alert can be found in the alert summary, including links to graphs and comparisons for each of the affected tests.

If you need the profiling jobs you can trigger them yourself from treeherder job view or ask afinder@mozilla.com to do that for you.

You can run all of these tests on try with ./mach try perf --alert 46941

The following documentation link provides more information about this command.

Flags: needinfo?(aethanyc)

Set release status flags based on info from the regressing bug 1988596

This is a nightly-only regression, and is expected per bug 1988596 comment 15.

Here is a performance comparison of current Nightly vs Nightly + bug 1987997.

With Bug 1987997 lands, it will bring the tests performance on par with Nightly builds with text-autospace disabled.

Depends on: 1987997
Flags: needinfo?(aethanyc)
Depends on: 1991943

Seems like we're going to do no-autospace by default which will fix this.

Severity: -- → S3
Priority: -- → P3

By far the biggest regressions here are the SVG text ones. It looks like the SVGTextFrame code has some pretty bad performance characteristics, which get magnified by the added work of text-autospace processing. The good news is that I think we can mitigate a lot of this with some judicious caching, so that we don't constantly re-create PropertyProvider instances and re-measure the same ranges of text over and over.

I've got some WIP patches here, waiting on tryserver to see how things go...

Assignee: nobody → jfkthame
Attachment #9518122 - Attachment description: WIP: Bug 1991689 - Cache advances of text ranges measured by TextRenderedRun::GetClipEdges in the root SVGTextFrame to accelerate ReflowSVG. → Bug 1991689 - Cache advances of text ranges measured by TextRenderedRun::GetClipEdges in the root SVGTextFrame to accelerate ReflowSVG. r=#layout-jp-market-reviewers
Status: NEW → ASSIGNED
Attachment #9518123 - Attachment description: WIP: Bug 1991689 - Cache a PropertyProvider in SVGTextFrame so that we don't have to create a fresh one for every call to the same textframe. → Bug 1991689 - Cache a PropertyProvider in SVGTextFrame so that we don't have to create a fresh one for every call to the same textframe. r=#layout-jp-market-reviewers

With these patches, we end up with substantially better results on the svg-text-textLength-1 test than before text-autospace was landed:

https://perf.compare/subtests-compare-results?baseRev=30b09d0a0bc99a7fc15db39635d26b4242ea3c55&baseRepo=try&newRev=c2d4a071d54eb8d5e047e92faea2df0d8c6c2886&newRepo=try&framework=1&baseParentSignature=4763178&newParentSignature=4763178

(The try run seems to show a few other improvements as well, though I'm unsure if these are real given that the patches here should only affect SVG. The recently-landed patches in bug 1991943 may have helped some of those other tests a bit, though.)

Whiteboard: [jp-triage]
Pushed by jkew@mozilla.com: https://github.com/mozilla-firefox/firefox/commit/4bc276362491 https://hg.mozilla.org/integration/autoland/rev/e38bccd1f4c1 Cache advances of text ranges measured by TextRenderedRun::GetClipEdges in the root SVGTextFrame to accelerate ReflowSVG. r=firefox-svg-reviewers,longsonr https://github.com/mozilla-firefox/firefox/commit/aa124118714b https://hg.mozilla.org/integration/autoland/rev/66e00f899737 Cache a PropertyProvider in SVGTextFrame so that we don't have to create a fresh one for every call to the same textframe. r=firefox-svg-reviewers,longsonr
Pushed by imoraru@mozilla.com: https://github.com/mozilla-firefox/firefox/commit/5416d09b794a https://hg.mozilla.org/integration/autoland/rev/05cf3e73d4f6 Revert "Bug 1991689 - Cache a PropertyProvider in SVGTextFrame so that we don't have to create a fresh one for every call to the same textframe. r=firefox-svg-reviewers,longsonr" for causing multiple failures.

Ah, I see -- we need to be more careful to avoid the risk of using a stale PropertyProvider, as things like style changes might have invalidated it. I think I have this fixed locally, but will wait for more Try results before updating and re-landing.

Flags: needinfo?(jfkthame)
Pushed by jkew@mozilla.com: https://github.com/mozilla-firefox/firefox/commit/cc8d67d595ce https://hg.mozilla.org/integration/autoland/rev/d39196d22690 Cache advances of text ranges measured by TextRenderedRun::GetClipEdges in the root SVGTextFrame to accelerate ReflowSVG. r=firefox-svg-reviewers,longsonr https://github.com/mozilla-firefox/firefox/commit/56772201997e https://hg.mozilla.org/integration/autoland/rev/c4911116c376 Cache a PropertyProvider in SVGTextFrame so that we don't have to create a fresh one for every call to the same textframe. r=firefox-svg-reviewers,longsonr
Status: ASSIGNED → RESOLVED
Closed: 12 days ago
Resolution: --- → FIXED
Target Milestone: --- → 145 Branch
Points: --- → 1
Whiteboard: [jp-triage] → [jp-mvp]
No longer depends on: 1987997
See Also: → 1987997
Regressions: 1993720
Regressions: 1993941
Regressions: 1994012
QA Whiteboard: [qa-triage-done-c146/b145]
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: