Closed Bug 1624724 Opened 4 years ago Closed 4 years ago

Startup cache is deleted on startup for Android

Categories

(Core :: XPCOM, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla76
Tracking Status
firefox76 --- fixed

People

(Reporter: bdahl, Assigned: bdahl)

References

(Blocks 1 open bug)

Details

Attachments

(1 file)

When running geckoview example I noticed that every time the app was started, lastStartupWasCrash was set to true, which causes the startup cache to be wiped out.

The CheckLastStartupWasCrash method creates a file that should be deleted on a clean shutdown to signal that the app started up correctly. However, on android the app will never be shutdown cleanly and is always killed. It's also unlikely the app will stay open for 6hrs.

Removing the startup crash check (i.e. fixing startup cached) improves gv example performance quite a bit, here's 5 runs timing from XRE_mainRun to domcontentloaded of a stub page on a moto g5:

baseline:
median 2.20
stddev 0.01

w/o startup crash check:
median 1.38
stddev 0.02

(In reply to Brendan Dahl [:bdahl] from comment #0)

The CheckLastStartupWasCrash method creates a file that should be deleted on a clean shutdown to signal that the app started up correctly. However, on android the app will never be shutdown cleanly and is always killed. It's also unlikely the app will stay open for 6hrs.

There's another caller which calls trackStartupCrashEnd once Firefox becomes idle startup.

Nevermind, that one is under browser/, GeckoView doesn't run any of that code.

Gecko uses a canary file to determine if the last startup was succesful or
not and subsequently uses that status to determine if the startup cache
should be used. The file should be deleted either on a clean
exit or after the browser has succesfully started after a delay. On
android there will never be a clean exit and file was not manually being
deleted after startup. To fix this, delete the file after all the idle
startup tasks finish.

Assignee: nobody → bdahl
Status: NEW → ASSIGNED
Pushed by bdahl@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/7e5d2266b58f
Fix startup crash tracking in GeckoView. r=geckoview-reviewers,aklotz,snorp
Status: ASSIGNED → RESOLVED
Closed: 4 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla76
Depends on: 1728461
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: