Closed Bug 1850415 Opened 9 months ago Closed 9 months ago

Desktop Canvas Performance Locked

Categories

(Core :: Graphics: Canvas2D, defect)

Firefox 116
defect

Tracking

()

RESOLVED DUPLICATE of bug 1824472

People

(Reporter: windfreaker, Unassigned)

Details

Attachments

(1 file)

User Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:109.0) Gecko/20100101 Firefox/116.0

Steps to reproduce:

I am learning the basics of the HTML5 canvas and I think I ran into a browser problem. I have recreated it here: https://jsfiddle.net/WindFreaker/rqn0uLt5/34/

On my desktop PC, in Firefox, the canvas only updates ~65 times a second. This is significantly lower than the target 240 times a second. This is NOT a performance limitation. If you open up Firefox's performance profiler and start recording, the canvas will being updating over 200 times a second.

This issue does not appear to happen in any other browser and does not happen on Firefox mobile either. All other browsers achieve 240 updates a second or higher.

I can't find any issue with my canvas test or any explanation for Firefox's throttling.

Actual results:

The canvas should update as often as I attempt to update it (within the performance limitations of my machine).

Expected results:

The canvas is locked at ~65 updates a second, or about 2/3rds of the target, whichever is smaller.

The Bugbug bot thinks this bug should belong to the 'Core::Graphics: Canvas2D' component, and is moving the bug to that component. Please correct in case you think the bot is wrong.

Component: Untriaged → Graphics: Canvas2D
Product: Firefox → Core

Thanks for the bug report. There must be something device / OS specific happening here, as I see >200fps on the devices I have tested on. Could you please go to about:support, click "copy text to clipboard", and attach the contents to this bug? Thanks!

Flags: needinfo?(windfreaker)
Attached file about:support dump

Bug 1814951 may be related to this one.

On windows, if I enable the profiler, I get 230 updates per second. This sounds the exact same issue described in bug 1824472 (https://bugzilla.mozilla.org/show_bug.cgi?id=1824472#c6)

@Austin Farmer: https://bugzilla.mozilla.org/show_bug.cgi?id=1824472#c11 has potential workarounds/better solution.

See Also: → 1824472

Thank you for pointing out that comment. As it suggests requestAnimationFrame provides a fix that fits my work.

Flags: needinfo?(windfreaker)

Great. I will dupe this bug to that one. Feel free to undupe if you disagree.

Status: UNCONFIRMED → RESOLVED
Closed: 9 months ago
Duplicate of bug: 1824472
Resolution: --- → DUPLICATE
See Also: 1824472
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: