Desktop Canvas Performance Locked
Categories
(Core :: Graphics: Canvas2D, defect)
Tracking
()
People
(Reporter: windfreaker, Unassigned)
Details
Attachments
(1 file)
46.82 KB,
text/plain
|
Details |
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.
Comment 1•9 months ago
|
||
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.
Comment 2•9 months ago
|
||
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!
Reporter | ||
Comment 3•9 months ago
|
||
Bug 1814951 may be related to this one.
Comment 5•9 months ago
|
||
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.
Reporter | ||
Comment 6•9 months ago
|
||
Thank you for pointing out that comment. As it suggests requestAnimationFrame
provides a fix that fits my work.
Comment 7•9 months ago
|
||
Great. I will dupe this bug to that one. Feel free to undupe if you disagree.
Description
•