Closed Bug 1907755 Opened 7 months ago Closed 7 months ago

Perf regression on a dwitter demo with canvas (d2d/gpu/skia)

Categories

(Core :: Graphics: Canvas2D, defect)

defect

Tracking

()

RESOLVED FIXED
130 Branch
Tracking Status
firefox-esr115 --- unaffected
firefox-esr128 --- wontfix
firefox128 --- wontfix
firefox129 --- wontfix
firefox130 --- verified

People

(Reporter: mayankleoboy1, Assigned: lsalzman)

References

(Blocks 1 open bug, Regression, )

Details

(Keywords: regression)

Attachments

(3 files)

Use wither d2d/canvas or gpu-canvas or skia-canvas.
Go to https://www.dwitter.net/d/32110

AR: The GPU use is 75% and the demo stutters.

GPU-canvas (bad): https://share.firefox.dev/4bJMrgb .
D2d-canvas (bad): https://share.firefox.dev/3zQsl6n

ER: Very smooth like previously. Chrome too is smooth here. In fact, we were better than Chrome here. Chrome takes 100% GPU while Firefox took only 25%.

Bisection:
Bug 1878884 - Keep RecordedTextureData snapshot around until it actually changes. r=aosmond
Differential Revision: https://phabricator.services.mozilla.com/D201164

Summary: Perf regression on a dwitter demi with canvas (d2d/gpu/skia) → Perf regression on a dwitter demo with canvas (d2d/gpu/skia)
Attached file about:support

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

:lsalzman, since you are the author of the regressor, bug 1878884, could you take a look? Also, could you set the severity field?

For more information, please visit BugBot documentation.

Severity: -- → S3
Flags: needinfo?(lsalzman)

Even though drawing a canvas to itself tries to use ExtractSubrect to get a limited
copy where applicable, the canvas still inadvertently forces the copy-on-write snapshot
to also force a copy due to SurfaceFromElementResult holding a subversive extra reference
to the snapshot, keeping it alive when it need not be.

RecordedTextureData also holds a reference to the snapshot that needs to be cleaned up
as well when the DT is modified.

Assignee: nobody → lsalzman
Status: NEW → ASSIGNED
Pushed by lsalzman@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/88084791c60f Avoid inadvertent copies when drawing a canvas to itself. r=aosmond
Status: ASSIGNED → RESOLVED
Closed: 7 months ago
Resolution: --- → FIXED
Target Milestone: --- → 130 Branch

Profile with latest Nightly: https://share.firefox.dev/3Lm2pSS
We are back to pre-regression levels of perf and GPU use.

Blocks: 1880018
Blocks: 1894906

On Win11 using FF build 130.0a1 the CPU was much higher then on FF build 130.0b1 and after the fix the canvas moved much faster. Marking issue as verified.

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

Attachment

General

Creator:
Created:
Updated:
Size: