Figure out prioritization levels for non-content processes
Categories
(GeckoView Graveyard :: Sandboxing, task, P1)
Tracking
(firefox78 fixed)
Tracking | Status | |
---|---|---|
firefox78 | --- | fixed |
People
(Reporter: bugzilla, Assigned: bugzilla)
References
Details
(Whiteboard: [geckoview:m78])
Attachments
(1 file)
Per discussion at https://phabricator.services.mozilla.com/D68419#inline-405631:
if we go to the background we probably care more about the main process staying alive that the media process or the socket process (when it will be enabled).
ie we need to determine how/what to do with those processes priorities.
Assignee | ||
Updated•5 years ago
|
Assignee | ||
Updated•5 years ago
|
Updated•5 years ago
|
Assignee | ||
Updated•4 years ago
|
Assignee | ||
Comment 1•4 years ago
|
||
I think that the status-quo of non-content processes always receiving foreground is fine. When the parent goes background, Android sends its bound child processes to the background along with it.
Maybe the only exception to that would be if we wanted to be clever with respect to the extension process. As a hypothetical example, suppose the user has installed an extension that is restricted to specific origins. Perhaps we don't boost the extension process's priority to foreground unless there are content process(es) corresponding to those origins are in the foreground.
I think I'm going to resolve this as WORKSFORME for now.
Assignee | ||
Comment 2•4 years ago
|
||
Ah, or maybe we want to do something about relative priority so that, as mentioned in the description, other processes are terminated before the main process is.
Assignee | ||
Comment 3•4 years ago
|
||
Gecko's process priority manager works exclusively with content processes, so that is not particularly useful here.
Probably the best way for us to handle this is 100% at the Java layer, using the proper lifecycle callbacks to adjust the non-content process priority.
Assignee | ||
Updated•4 years ago
|
Assignee | ||
Comment 4•4 years ago
|
||
Hmm, maybe we can also alter the socket process's priority depending on the state of network connectivity.
Assignee | ||
Comment 5•4 years ago
|
||
- We attach a native counterpart to ths GeckoProcessManager.ConnectionManager
instance that listens for app foreground, app background, and when the
socket process is enabled, network state events. - On app background, all non-content processes are assigned BACKGROUND priority.
Even though backgrounding the app will cause Android to drop all child
processes' priority regardless of our priority settings, we still do this as
to indicate to Android that these processes are relatively less important
than our parent process. - When the socket process is enabled, we drop its priority when we detect that
we have no network connectivity. Note that the network management code does
the Right Thing if network connectivity changes while our app was in the
background: we receive the network state change event once we return to
foreground, therefore we do not need to do any special handling ourselves.
Updated•4 years ago
|
Pushed by aklotz@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/06b7037addb5 Add priority management for non-content child processes to GeckoProcessManager; r=geckoview-reviewers,agi
Comment 7•4 years ago
|
||
bugherder |
Comment 8•2 years ago
|
||
Moving content process management bugs to the new GeckoView::Sandboxing component.
Updated•4 months ago
|
Description
•