Investigate re-enabling process prelaunching (preallocation) on Android
Categories
(GeckoView :: General, enhancement)
Tracking
(Not tracked)
People
(Reporter: kaya, Assigned: sinker)
References
(Blocks 2 open bugs)
Details
(Whiteboard: [group1][fxdroid])
Attachments
(1 file, 1 obsolete file)
The process prelauncing is disabled on Android. (see Bug 1447393).
With Fission coming up, to improve the pageload performance, we should consider enabling the process prelaunching to reduce the costs caused by spawning new content processes at the time of page loads.
Enabling the pref shows improvements in pageload performance for Fission up to 17% (see perfcompare).
In the scope of this ticket, we should investigate how stable process prelaunching is at the moment, and the required work -if any- to make it stable.
Updated•5 months ago
|
Updated•5 months ago
|
Assignee | ||
Updated•4 months ago
|
Updated•3 months ago
|
Updated•3 months ago
|
Comment hidden (obsolete) |
Comment 2•2 months ago
|
||
By itself, this patch will have the following effect: Once Gecko
has requested the first content process, after some delay, a
second content process will be preallocated on Android. This process
is used once a second tab is loaded or once a Fission-enabled site
is loaded. The process count limit in dom.ipc.processCount is
honored and no further processes will be preallocated once the limit
is reached.
Flipping this pref has no impact on startup times because Gecko's
PreallocatedProcessManager currently doesn't kick off preallocation
before the first time someone asks for a new content process, and
because it currently only ever kicks off a preallocation on idle.
However, in bug 1958065 and bug 1958327 we want to actually kick off
the content processes needed for startup at an earlier time, and we
need a place to store the handles to the preallocated processes. The
PreallocatedProcessManager seems like the right place to store these
handles, and we'll need the pref to be true at that point so that the
right code paths are exercised.
By flipping the pref now, we can front-load some of the risk of the
changes planned for bug 1958065 and bug 1958327.
Updated•2 months ago
|
Comment 3•2 months ago
•
|
||
(In reply to Kaya [:kaya] from comment #0)
In the scope of this ticket, we should investigate how stable process prelaunching is at the moment, and the required work -if any- to make it stable.
I used a try build with this a bit and didn't notice any trouble. And I can't think of a reason there would be trouble - it's just launching the second content process a bit earlier. The preloader code paths are already exercised on desktop. The content process launching code paths are already exercised on Android once you load a second tab. There's not really any new source of risk here.
I think we should just flip the pref. If there are problems we'll notice them.
Comment 4•2 months ago
•
|
||
(In reply to Kaya [:kaya] from comment #0)
With Fission coming up
Even when Fission is enabled, PreallocatedProcessManager
only allocates processes until we hit the limit in dom.ipc.processCount
. So at the moment we still won't have more than 2 content processes if we flip the dom.ipc.processPrelaunch.enabled
pref.
Links to the code: PreallocatedProcessManagerImpl::CanAllocate()
calls ContentParent::IsMaxProcessCountReached(DEFAULT_REMOTE_TYPE)
which calls ContentParent::GetMaxProcessCount(DEFAULT_REMOTE_TYPE)
which returns GetMaxWebProcessCount()
which returns the value of the dom.ipc.processCount
pref.
Comment 5•2 months ago
|
||
Comment 6•1 month ago
|
||
The try push is showing a fair amount of timeouts in the mda1+mda2 tests, i.e. the geckoview-mochitest-media tests, both on the regular Android x86-64 debug configuration, but particularly on the debug-isolated-process configuration.
Comment 7•29 days ago
|
||
There is an r+ patch which didn't land and no activity in this bug for 2 weeks.
:sinker, could you have a look please?
If you still have some work to do, you can add an action "Plan Changes" in Phabricator.
For more information, please visit BugBot documentation.
Comment 8•29 days ago
|
||
This is blocked on investigating test failures.
Description
•