Open Bug 1782566 Opened 2 years ago Updated 2 years ago

Performance regression in some HTML5 games (Profiles seems to suggest large time spent in JIT)

Categories

(Core :: JavaScript Engine: JIT, defect, P2)

Firefox 103
defect

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:

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.

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.

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

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

Status: UNCONFIRMED → NEW
Component: Graphics: CanvasWebGL → JavaScript Engine: JIT
Ever confirmed: true
Summary: Performance regression in some HTML5 games → Performance regression in some HTML5 games (Profiles seems to suggest large time spent in JIT)

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)?

Blocks: WarpBuilder
Flags: needinfo?(jdemooij)

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.

Depends on: 1782953
Depends on: 1783607
Severity: -- → S3
Priority: -- → P2

Profile with latest nightly : https://share.firefox.dev/3QKM0ra

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