Closed Bug 2072448 Opened 2 months ago Closed 1 month ago

Poor canvas performance compared to Chrome (Zara Larsson Google easter egg)

Categories

(Core :: Graphics: Canvas2D, defect)

Firefox 155
defect

Tracking

()

RESOLVED FIXED
158 Branch
Tracking Status
firefox-esr115 --- wontfix
firefox-esr140 --- wontfix
firefox-esr153 --- fixed
firefox156 --- wontfix
firefox157 --- wontfix
firefox158 --- fixed

People

(Reporter: marcelohdez.inq, Assigned: lsalzman)

References

(Regression)

Details

(Keywords: perf-alert, regression)

Attachments

(2 files, 2 external files)

Steps to reproduce:

Look up "Zara Larsson" on Google.
Scroll down until the effect plays, or use the flower button at the bottom to spawn multiple dolphins.

I tried to pause the execution through devtools, and see that the effect is a single canvas element overlaid on top of the page?

Actual results:

The animations hang with multiple dolphins on-screen.

Expected results:

Smooth animations, like in Chrome.

Marcelo, can you please attach the output of your about:support page to this report? It will help us diagnose the issue.

Dropping into triage so Lee has a heads-up here.

Blocks: gfx-triage
Severity: -- → S3
Component: Graphics → Graphics: Canvas2D
Flags: needinfo?(marcelohdez.inq)
Priority: -- → P2
Severity: S3 → S4
Priority: P2 → --
Attached file about:support output —
Flags: needinfo?(marcelohdez.inq)
Attachment #9645314 - Attachment mime type: application/json → text/plain

There was actually a bug preventing Accelerated Canvas from caching radial gradients, and the page was drawing a giant radial gradient over and over that should have been cached, but wasn't. The fix is actually pretty simple. This might fix performance in a number of other cases.

Severity: S4 → S3
Keywords: regression
Regressed by: 1765911

decltype(this) inside a const method is actually const Foo&, instead of just Foo.
This caused IsWeak to always return false. Fix it to use the correct comparison of
is_same<decltype(this), const Weak
>.

Assignee: nobody → lsalzman
Status: UNCONFIRMED → ASSIGNED
Ever confirmed: true

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

Pushed by lsalzman@mozilla.com: https://github.com/mozilla-firefox/firefox/commit/cae1f0c18d3b https://hg.mozilla.org/integration/autoland/rev/088bb563a2ba Fix PatternT::IsWeak() to compare against the correct type. r=gfx-reviewers,tnikkel
No longer blocks: gfx-triage
Status: ASSIGNED → RESOLVED
Closed: 1 month ago
Resolution: --- → FIXED
Target Milestone: --- → 158 Branch

Perfherder has detected a talos performance change from push 0dcb443c4fc9830dc6ed8c05de3f3a7d1578a936.

No action is required from the author; this comment is provided for informational purposes only.

Improvement Test Platform Options Absolute values [old vs new]
7% pdfpaint issue16395.pdf (doc) windows11-64-24h2-shippable e10s fission stylo webrender 306.58 ms -> 283.68 ms

Need Help or Information?

If you have any questions, please reach out to fbilt@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.

Keywords: perf-alert

firefox-esr153 Uplift Approval Request

  • User impact if declined/Reason for urgency: Potential excessive memory use and slow rendering in Canvas2D.
  • Code covered by automated testing?: yes
  • Fix verified in Nightly?: yes
  • Needs manual QE testing?: no
  • Steps to reproduce for manual QE testing:
  • Risk associated with taking this patch: low
  • Explanation of risk level: Fixes an incorrect type check in a cache, so that caching now works properly.
  • String changes made/needed?: None
  • Is Android affected?: yes
Attachment #9649488 - Flags: approval-mozilla-esr153?

decltype(this) inside a const method is actually const Foo&, instead of just Foo.
This caused IsWeak to always return false. Fix it to use the correct comparison of
is_same<decltype(this), const Weak
>.

Original Revision: https://phabricator.services.mozilla.com/D327559

Attachment #9649488 - Flags: approval-mozilla-esr153? → approval-mozilla-esr153+
QA Whiteboard: [qa-triage-done-c159/b158]
Regressions: 2084640
See Also: → 2091902
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: