Closed Bug 1880018 Opened 1 year ago Closed 1 year ago

[gpu-canvas] Performance regression on a Codepen demo (https://codepen.io/KilledByAPixel/pen/WNQoMYg) with gpu-canvas

Categories

(Core :: Graphics: Canvas2D, defect)

defect

Tracking

()

VERIFIED FIXED
124 Branch
Tracking Status
firefox-esr115 --- unaffected
firefox122 --- unaffected
firefox123 --- wontfix
firefox124 --- verified

People

(Reporter: mayankleoboy1, Assigned: lsalzman)

References

(Regression, )

Details

(Keywords: regression)

Attachments

(2 files)

Use latest nightly on Windows.

Set the following prefs
gfx.direct2d.disabled = true
gfx.canvas.accelerated = true
gfx.canvas.remote.worker-threads = 0

Go to https://codepen.io/KilledByAPixel/pen/WNQoMYg

AR: The browser freezes and the demo is very slow to run.

Regression range:
Bug 1829026 - Handle KERN_ABORTED from semaphore_wait. r=aosmond
Differential Revision: https://phabricator.services.mozilla.com/D195952

Note that the performance regressed for both GPU-canvas and d2d-canvas, but gpu-canvas has a much worse regression. With skia-canvas, it runs absolutely fine. I have not filed any bug for d2d-canvas. Let me know if needed.

GPu-canvas: https://share.firefox.dev/49cxanz (very bad)
skia-canvas: https://share.firefox.dev/49pAbkg (very good)
d2d-canvas: https://share.firefox.dev/4bBO2Wd (bad)

Attached file about:support
Flags: needinfo?(lsalzman)

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

Flags: needinfo?(lsalzman)

ExtractSubrect calls were not getting forwarded on SourceSurfaceRecording, causing us to do unnecessary readbacks
when hitting the CopySurface fallback path. SourceSurfaceWebgl actually implements ExtractSubrect already, but it
was never being used since the switch over to the DrawTargetRecording infrastructure.

Assignee: nobody → lsalzman
Status: NEW → ASSIGNED
Summary: [gpu-canvas] Performance regression on a Codepen demo (codepen.io/KilledByAPixel/pen/WNQoMYg) with gpu-canvas → [gpu-canvas] Performance regression on a Codepen demo (https://codepen.io/KilledByAPixel/pen/WNQoMYg) with gpu-canvas
Pushed by lsalzman@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/0dce8e9d0ebb Implement RecordedExtractSubrect to forward ExtractSubract calls for SourceSurfaceRecording. r=aosmond
Status: ASSIGNED → RESOLVED
Closed: 1 year ago
Resolution: --- → FIXED
Target Milestone: --- → 124 Branch

Profile from latest Nightly: https://share.firefox.dev/3uxavDo
Subjectively it doesnt feel much better.

Reproduced the issue with Firefox 124.0a1 (2024-02-13) on Windows 10x64. The animation is laggy and the browser freezes.
I can no longer reproduce the freeze with Firefox 124.0b2 on Windows 10x64, macOS 13 and Ubuntu 23.1 However, the animation is not as smooth as before bug 1829026 with the same steps.
Also, it looks like the browser shows a slight delay when playing the animation on Ubuntu 23.1 and macOS 13 ARM. Should we open another issue for the remaining problem?

Has STR: --- → yes
Flags: needinfo?(lsalzman)

For now I worked on the actionable things in this bug, and there are probably enough existing perf bugs to cover the remaining.

Flags: needinfo?(lsalzman)

Thank you! Closing this as verified per comment 8 and comment 9 since the freeze is no longer reproducible.

Status: RESOLVED → VERIFIED
Flags: qe-verify+

This has improved : https://share.firefox.dev/462PSgB
blaming bug 1907755

Depends on: 1907755
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: