Closed Bug 1671490 Opened 3 years ago Closed 1 year ago

Increase the priority of the gpu process


(Core :: Graphics, enhancement, P3)




109 Branch
Tracking Status
firefox109 --- fixed


(Reporter: jrmuizel, Assigned: bas.schouten)


(Blocks 5 open bugs)



(2 files)

Blocks: 1657183
Blocks: 1671498
Severity: -- → S3
Priority: -- → P3
Blocks: 1671859
Blocks: 1685848
Blocks: 1694017
No longer blocks: 1694017

I find that code in Chrome surprising because IIRC normal Windows applications aren't allowed to use anything above NORMAL_PRIORITY_CLASS without special permissions but maybe things have changed (or I may mis-remember).

Implementing this should be relatively simple, it's just a matter of modifying ParticularProcessPriorityManager::ComputePriority() to use PROCESS_PRIORITY_FOREGROUND_HIGH and then modify hal_impl::SetProcessPriority() to use ABOVE_NORMAL_PRIORITY_CLASS for that level.

There is one important thing to keep in mind though: if no special permissions are required and this works you have to double-check that the higher priority doesn't affect the rest of the program. We did implement this in Firefox OS back in the day and it provided butter-smooth scrolling and perfect 60Hz refresh but significantly starved the main process' main thread dragging down the whole system. It was different hardware (low-end dual-core Android SoCs) so what applied then might not apply anymore but it's worth keeping it in mind.

Blocks: 1732144
Assignee: nobody → bas

See also the summary from, which has some caveats to increase the priority of GPU process ("we have too many gfx threads").

See Also: → 1763405
Component: Graphics: WebRender → Graphics
Pushed by
Mark the GPU process as being in the foreground whenever the parent process is in the foreground to make their priorities (and priority boosts) match, r=bas.
Closed: 1 year ago
Resolution: --- → FIXED
Target Milestone: --- → 109 Branch
Regressions: 1851991
You need to log in before you can comment on or make changes to this bug.