Increase the priority of the gpu process
Categories
(Core :: Graphics, enhancement, P3)
Tracking
()
Tracking | Status | |
---|---|---|
firefox109 | --- | fixed |
People
(Reporter: jrmuizel, Assigned: bas.schouten)
References
(Blocks 5 open bugs)
Details
Attachments
(2 files)
Reporter | ||
Updated•3 years ago
|
Updated•3 years ago
|
Comment 1•3 years ago
|
||
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.
Assignee | ||
Comment 2•1 year ago
|
||
Updated•1 year ago
|
Comment 3•1 year ago
|
||
See also the summary from https://phabricator.services.mozilla.com/D143056, which has some caveats to increase the priority of GPU process ("we have too many gfx threads").
Comment 4•1 year ago
|
||
Updated•1 year ago
|
Pushed by fqueze@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/18f23fa58771 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.
Comment 6•1 year ago
|
||
bugherder |
Description
•