Performance regression in some HTML5 games (Profiles seems to suggest large time spent in JIT)
Categories
(Core :: JavaScript Engine: JIT, defect, P2)
Tracking
()
People
(Reporter: gd.productions, Unassigned, NeedInfo)
References
(Blocks 1 open bug)
Details
User Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:103.0) Gecko/20100101 Firefox/103.0
Steps to reproduce:
1/ Browse to one of the links below to play a Sonic level:
- Canvas 2D: https://www.bankokado.net/firefox/canvas2d.html
- WebGL 1: https://www.bankokado.net/firefox/webgl.html
2/ The number of FPS is indicated in the top right corner of the game. Any value below 60 means there is a slowdown.
3/ Play the level (arrow keys and spacebar to move and jump) and notice that FPS drops happen way too often (on my device, when the level starts, I just have to go to the left and observe a slowdown when Sonic is in the water), no matter the game uses Canvas2D or WebGL.
--
This issue doesn't happen in Firefox 82.0.3.
It does happen starting Firefox 83.0.
Actual results:
Unexpected and constant FPS drops.
Expected results:
No FPS drops, like Chrome does and Firefox before 83.0 did.
Comment 1•2 years ago
|
||
The Bugbug bot thinks this bug should belong to the 'Core::Graphics: CanvasWebGL' component, and is moving the bug to that component. Please correct in case you think the bot is wrong.
Comment 2•2 years ago
|
||
Latest Nightly:
Canvas: https://share.firefox.dev/3zPVf4h
Webgl : https://share.firefox.dev/3zo5pHS
The profiles seem to suggest that a lot of time is spent in JIT (property access?). Tentatively moving to JS.
For comparison, profile from build equivalent to FF82 :
Webgl: https://share.firefox.dev/3vtopDG
Comment 3•2 years ago
|
||
This would be related to WarpBuilder (aka Bug 1613592).
Comparing WarpBuilder against previous versions is not going to help as the amount of changes is extremely large.
However, it might be interesting to check if there is no low hanging fruit to be optimized out of functions such as _1g.prototype._5e
as well as looking at the rise of js::jit::GetNativeDataPropertyPure
.
Jan, would this be something solvable by WatchTower (Bug 1750942)?
Comment 4•2 years ago
|
||
We're spending a fair amount of time under IonGetPropertyIC::update
. I looked into this and have some patches to improve this; I'll file some bugs over the coming days.
Updated•2 years ago
|
Comment 5•2 years ago
|
||
Profile with latest nightly : https://share.firefox.dev/3QKM0ra
Comment 6•2 years ago
|
||
webgl: https://share.firefox.dev/3PL63XH
Canvas2d: https://share.firefox.dev/3BRyvRT
Description
•