Glean code adds ~61ms on COLD start up, all types
Categories
(Firefox for Android :: Performance, defect)
Tracking
()
Performance Impact | low |
People
(Reporter: boek, Unassigned)
Details
From github: https://github.com/mozilla-mobile/fenix/issues/18322.
We ran an experiment where we "removed" Glean and measured the COLD start up duration: it improved median start up performance by 61ms on Nightly builds on the Moto G5. A 61ms potential improvement is significant: it's the largest remaining win we've found for all start up types.
To "remove" glean, we:
- disabled telemetry by flipping the commented out
isDebug
flag in gradle- commented out initializeGlean()
Note: there's still 13ms of Glean related code in the profile for the experiment https://share.firefox.dev/3kj9PYN so this wasn't a perfect removal and the wins could be greater (or less).
In theory, a performance-first implementation shouldn't have much overhead: for each recorded metric, it could queue the data in memory and, only after we've finished start up, we could do the heavy lifting to initialize Glean and transmit any pings. With this theory in mind, it seems like we can improve on the current implementation. That being said, the product team may prefer to take a performance hit, e.g. to send data earlier so we should discuss what are requirements are and work within them.
Marc mentioned a large part of this overhead may be attributable to the first SharedPrefs read (I think to determine if Glean is enabled or not).
┆Issue is synchronized with this Jira Task
Change performed by the Move to Bugzilla add-on.
Comment 1•2 years ago
|
||
The Performance Impact Calculator has determined this bug's performance impact to be low. If you'd like to request re-triage, you can reset the Performance Impact flag to "?" or needinfo the triage sheriff.
Platforms: Android
Impact on browser: Causes noticeable startup delay
Websites affected: Rare
Reporter | ||
Updated•1 year ago
|
Description
•