Analyze start up duration telemetry (discrepancy in onCreate duration telemetry vs. local Moto G5)
Categories
(Firefox for Android :: Performance, defect)
Tracking
()
| Performance Impact | none |
People
(Reporter: cpeterson, Unassigned)
Details
From github: https://github.com/mozilla-mobile/fenix/issues/18426.
The
perf_startup_home_activity_on_createprobe measuresHomeActivity.onCreateand looks like this:
The
perf_startup_application_on_createprobe measures the duration ofApplication.onCreate. The results look like this:
To sanity check these values, I measured these values locally on the Moto G5 (a slighly less than low-end device for our users) and compared it with the received telemetry (Beta channel 2021-03-05 build).
Activity.onCreateseems to match up: median 191 ms (202ms for first run) on the G5 which puts it comfortably within the 75th percentile (134ms) and the 95th percentile (268ms). However,Application.onCreatedoes not match up: median is 432.5ms (521ms for first run) which is towards the bottom within the 50th (414ms) and 75th (696ms).This comes down to the key discrepancy: I'd expect the Moto G5 to be consistent between the probes but it's not. Our intuition for Moto G5 performance seems aligned with
Activity.onCreateso this makesApplication.onCreateseem suspicious but it's not necessarily the cause.A second discrepancy is that the distribution of these two probes is different: app.onCreate has a larger gap to the 95th percentile, which has an unexpectedly high duration (1.8s). This also points to app.onCreate as being suspicious.
We should investigate the cause of this discrepancy – for example, perhaps there is a performance issue in
app.onCreate.
We already know there are differences between these probes that could be related:
- App.onCreate and Activity.onCreate aren't called the same number of times and may be called under different conditions (e.g. if the device is low on memory, we're more likely to see App.onCreate called when fenix is opened)
- FenixApplication may be paired with activities besides HomeActivity, which may affect the conditions under which it's called
FenixApplication.onCreatewill always lazily initialize the same pieces of code. However, ifHomeActivity.onCreateis called when the process is already alive, it may run different code based on what components are already lazily initialized (e.g. if HomeActivity was already created) – it may be fasterHomeActivity.onCreatemay be able to restore a layout from a bundle, which could speed up performanceAlso, I don't know how the data is aggregated (i.e. how does a single user contribute to this visualization?) so that could be another cause of discrepancy.
┆Issue is synchronized with this Jira Task
Change performed by the Move to Bugzilla add-on.
Comment 1•2 years ago
|
||
The severity field is not set for this bug.
:cpeterson, could you have a look please?
For more information, please visit auto_nag documentation.
Updated•2 years ago
|
Comment 2•2 years ago
|
||
The Performance Impact Calculator has determined this bug's performance impact to be none. If you'd like to request re-triage, you can reset the Performance Impact flag to "?" or needinfo the triage sheriff.
Platforms: Android
Websites affected: Rare
Updated•2 years ago
|
Description
•