Open Bug 1623990 Opened 4 years ago Updated 2 years ago

Gaming or Green mode for Firefox

Categories

(Firefox :: General, enhancement, P3)

enhancement

Tracking

()

People

(Reporter: jesup, Unassigned)

References

Details

Opera has a "gaming" version; we were discussing having a "gaming" mode or a "green" mode for Firefox, which minimizes resource usage while a game is running.

mconnor did some investigation a while back: https://docs.google.com/document/d/1a9peJElT9cQWIuguM13XTTRfGEAvyiR2CPB9jpnhyHo/edit#heading=h.u0dn3kmp4yg

Off the top of my head, from a perf perspective:
When we believe/know a game is running (or for Green mode, when we're not focused):
Throttle foreground threads like background
Freeze all tabs instead of throttling?
Mute all tabs, pause all videos (but allow this to be overridden)
Pause all user downloads/automatic downloads (update)/other updates (safebrowsing/etc)
This may conflict with people who want to do something like play a game waiting for a download to finish, especially in poorly-connected areas.
Do a GC pass to minimize ram (maybe)
Unload (larger?) background tabs??? (maybe not, maybe dependent on ram, etc)

There is also bug #1351755 for "Slight/Light/Low power/Battery saving/Battery saver" mode option, also based on Opera feature.

See Also: → 1351755
Priority: -- → P3

Bugbug thinks this bug should belong to this component, but please revert this change in case of error.

Component: General → Audio/Video: Playback
Product: Firefox → Core
Component: Audio/Video: Playback → General
Product: Core → Firefox

(In reply to Randell Jesup [:jesup] (needinfo me) from comment #0)

Do a GC pass to minimize ram (maybe)

I was speaking to someone running Firefox on (I think) a Pinephone. it had limited ram and if they launched another heavy-ish process it would increase memory pressure. Which would (correctly) cause Firefox to begin a memory-pressure GC/CC, but they noted that Firefox's didn't release the memory fast enough to race against the other program's memory needs.

We'd want to free memory fairly quickly to meet a launching game's demands, but at the same time try to avoid getting in the game's way.

Do we through away memory caches and/or jit copies of code in low memory situations? We could do the same for a launching game and it might be better since in a "game is launching" situation rather than "low on memory" we can expect the caches/jit'd code won't be needed for a while.

Severity: normal → S3
You need to log in before you can comment on or make changes to this bug.