Closed
Bug 2023004
Opened 5 months ago
Closed 5 months ago
Make Gecko child process preallocation happen serially and delay it if we're just showing the homescreen
Categories
(Firefox for Android :: Performance, task)
Tracking
()
RESOLVED
FIXED
150 Branch
| Tracking | Status | |
|---|---|---|
| firefox150 | --- | fixed |
People
(Reporter: mstange, Assigned: mstange)
References
(Blocks 1 open bug)
Details
Attachments
(2 files)
I'm filing this bug so that I can land the first two patches from bug 1960752 separately, since they make sense on their own.
| Assignee | ||
Comment 1•5 months ago
|
||
In the past, we were allocating a content process unconditionally
during GeckoThread initialization. This means that we would spend
CPU time starting up a tab process very early during startup even
when we were only going to show the home screen. It also means that
we can't add more processes here without affecting home screen startup
negatively.
This patch does the following:
- Do the preallocation during GeckoEngine.warmUp(). We had an existing
warmUp method but it was just there to trigger the instance creation
on a lazy property. Now it has an actual purpose. - Replace the call to warmUp() in FenixApplication.onCreate with a simple
property access, so that Engine instance creation is still triggered in
the same place as before. - Add a call to warmUp() to the visual completeness queue.
This means that during home view startup, we will delay the child
process preallocation until the home view is visible. - Additionally, to keep preallocation happening early during applink
startup, create a speculative Gecko session if the IntentReceiverActivity
notices that we're about to load a page. And call warmUp() from the
speculative Gecko session method. - Call setIsolatedProcessEnabled and setAppZygoteEnabled earlier so that
warmUp creates the right content process types.
As a result, we'll still allocate a tab process early during applink startup,
but we'll delay it during homeview startup.
Updated•5 months ago
|
Assignee: nobody → mstange.moz
Status: NEW → ASSIGNED
| Assignee | ||
Comment 2•5 months ago
|
||
Pushed by mstange@mozilla.com:
https://github.com/mozilla-firefox/firefox/commit/41b6fda87e88
https://hg.mozilla.org/integration/autoland/rev/979858ece73c
Change how we do child process preallocation. r=tcampbell,geckoview-reviewers,android-reviewers,geckoview-api-reviewers,jonalmeida
https://github.com/mozilla-firefox/firefox/commit/d4a82e3f9bde
https://hg.mozilla.org/integration/autoland/rev/e7d57519f52e
Preload processes sequentially. r=geckoview-reviewers,tcampbell
https://hg.mozilla.org/mozilla-central/rev/979858ece73c
https://hg.mozilla.org/mozilla-central/rev/e7d57519f52e
Status: ASSIGNED → RESOLVED
Closed: 5 months ago
status-firefox150:
--- → fixed
Resolution: --- → FIXED
Target Milestone: --- → 150 Branch
You need to log in
before you can comment on or make changes to this bug.
Description
•