Open Bug 1859857 Opened 2 years ago Updated 14 days ago

[meta] Introduce Zygote Preload as an Android Option

Categories

(GeckoView :: General, enhancement, P3)

All
Android
enhancement

Tracking

(Not tracked)

People

(Reporter: kaya, Unassigned)

References

(Depends on 7 open bugs, Blocks 2 open bugs)

Details

(Keywords: meta, Whiteboard: [fxdroid] [foundation][android-tab-reloading] )

A POC of Zygote Preload API has been implemented to prove the improvements on the resource consumption of Fenix as a part of Bug 1804868. Currently it is blocked by Bug 1565196. Once that meta is resolved, the POC will be merged into the codebase and Zygote Preload api will be shipped.

Assignee: nobody → kkaya
Severity: -- → N/A
Priority: -- → P3
Summary: Introduce Zygote Preload API on Fenix → Introduce Zygote Preload API in GeckoView
Whiteboard: [fxdroid] [foundation]
Blocks: 1752594
Rank: 399

Can we have an RFC for this?

Flags: needinfo?(kkaya)

Yes, i'll do that. It is one of the next items I'll deal with. Let me create a ticket for easier tracking.

Flags: needinfo?(kkaya)
Depends on: 1907023
Whiteboard: [fxdroid] [foundation] → [fxdroid] [foundation][android-tab-reloading]
See Also: → 1929365

(resetting owner until we resume this)

Assignee: kkaya → nobody
Depends on: 1989943

Turning this into a meta to better capture all of the pieces that will be involved for this to go through.

Depends on: 1991512
Summary: Introduce Zygote Preload API in GeckoView → [meta] Introduce Zygote Preload API in GeckoView
Keywords: meta
Depends on: 1991536
Depends on: 1991537
Depends on: 1991538
Summary: [meta] Introduce Zygote Preload API in GeckoView → [meta] Introduce Zygote Preload as an Android Option
Depends on: 1992242
Depends on: 1985804
Blocks: 1985804
No longer depends on: 1985804
Depends on: 1995319
Depends on: 1995392

From the performance side, one thing I noticed is that, with the app zygote enabled, I sometimes see very slow app zygote startup where it does a full verification of the dex. It looks like this happens once an "app image" exists, i.e. after I run adb shell cmd package compile -m speed-profile org.mozilla.fenix. We should do more research on what exactly the trigger is and why it happens.

Fast app zygote startup: https://share.firefox.dev/3MHqEig
Slow app zygote startup, after compile -m speed-profile and all subsequent startups: https://share.firefox.dev/4pOeByn

(In reply to Markus Stange [:mstange] from comment #5)

Fast app zygote startup: https://share.firefox.dev/3MHqEig
Slow app zygote startup, after compile -m speed-profile and all subsequent startups: https://share.firefox.dev/4pOeByn

Generally, if *.oat file is gone or invalid, ART generates oat file like slow profile.

You need to log in before you can comment on or make changes to this bug.