Open Bug 1879824 Opened 8 months ago Updated 6 months ago

Codepen demo (https://codepen.io/sschepis/full/wvqzOr) becomes very slow with D2d-canvas

Categories

(Core :: Graphics: Canvas2D, defect)

Unspecified
Windows
defect

Tracking

()

Tracking Status
firefox-esr115 --- unaffected
firefox122 --- unaffected
firefox123 --- wontfix
firefox124 --- wontfix
firefox125 --- wontfix

People

(Reporter: mayankleoboy1, Unassigned)

References

(Depends on 2 open bugs, Regression, )

Details

(Keywords: regression)

Attachments

(1 file, 1 obsolete file)

Use latest Nightly on Windows with D2d-canvas enabled
Go to https://codepen.io/sschepis/full/wvqzOr

AR: The animation becomes very stuttery very quickly.

Regression :

Bug 1871467 - Remove unnecessary CanvasTranslator locking. r=aosmond CLOSED TREE

Differential Revision: https://phabricator.services.mozilla.com/D197112

Attached file about:support

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

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

For more information, please visit BugBot documentation.

Lee, can we please get Priority/Severity settings applied here?

Severity: -- → S4
Flags: needinfo?(lsalzman)
Depends on: 1880312

WGR is fairly slow at generating specialized circle geometry, whereas we can
generate similar geometry much faster using the AAStroke filled circle
implementation now.

Assignee: nobody → lsalzman
Status: NEW → ASSIGNED

Comment on attachment 9380356 [details]
Bug 1879824 - Use aa_stroke_filled_circle in DrawTargetWebgl. r?jrmuizel

Revision D201939 was moved to bug 1880523. Setting attachment 9380356 [details] to obsolete.

Attachment #9380356 - Attachment is obsolete: true
Assignee: lsalzman → nobody
Status: ASSIGNED → NEW

Might you please collect a profile so I can see what's going on here?

Flags: needinfo?(mayankleoboy1)

(In reply to Lee Salzman [:lsalzman] from comment #6)

Might you please collect a profile so I can see what's going on here?

https://share.firefox.dev/49B4WT5 / https://share.firefox.dev/3OJ5kHj (gfx logging preset)

Flags: needinfo?(mayankleoboy1) → needinfo?(lsalzman)
Flags: needinfo?(lsalzman)

In that profile, it's still hitting the DrawTargetD2D1::FillCircle path, so that hasn't really changed, and is what it is as far as performance. The only real overhead I see in the front-end is from the sheer amount of FillCircle requests being submitted in the recording, which is causing us to occasionally block on waiting for buffers here.

Any thoughts, Bob?

Flags: needinfo?(bobowencode)

(In reply to Lee Salzman [:lsalzman] from comment #8)

In that profile, it's still hitting the DrawTargetD2D1::FillCircle path, so that hasn't really changed, and is what it is as far as performance. The only real overhead I see in the front-end is from the sheer amount of FillCircle requests being submitted in the recording, which is causing us to occasionally block on waiting for buffers here.

Any thoughts, Bob?

I don't spot anything obvious we can do other that increase the max buffers.
It's an arbitrary figure, but I'm not sure how we would optimize it.

Flags: needinfo?(bobowencode)

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

Depends on: 1881102

(In reply to Mayank Bansal from comment #7)

(In reply to Lee Salzman [:lsalzman] from comment #6)

Might you please collect a profile so I can see what's going on here?

https://share.firefox.dev/49B4WT5 / https://share.firefox.dev/3OJ5kHj (gfx logging preset)

The first profile shows that we're actually spending only 3.5ms per animation update on the main thread. So in theory we can run this animation very quickly.
However, we're updating the screen at a much worse rate.
The page runs the animation from setTimeout. Each individual setTimeout callback is fast.
However, we only update the screen once the refresh driver ticks and submits the main thread frame to the compositor.

The profile shows that the refresh driver ticks occur at a very low rate: https://share.firefox.dev/3UGaqIa (this is the same profile, just a different view into it)
And a lot of the ticks don't submit a paint because a previous paint hasn't been composited yet ("RefreshDriverTick waiting for paint").

So this is a problem with overproduction. If canvas work is added outside of refresh ticks, then the current backpressure mechanism isn't sufficient. So this is basically bug 1831609.

On my machine, I couldn't reproduce the "RefreshDriverTick waiting for paint" problem, instead I see a different reason for slow ticks, which I filed as bug 1881102.

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

Attachment

General

Creator:
Created:
Updated:
Size: