Open Bug 1947488 Opened 1 month ago Updated 12 hours ago

FenixApplication::setPreferenceMetrics requires a lot of dependencies to initialize

Categories

(Firefox for Android :: Performance, task)

All
Android
task

Tracking

()

People

(Reporter: boek, Assigned: matt-tighe)

References

(Blocks 1 open bug)

Details

(Whiteboard: [fxdroid][group1])

Attachments

(1 file)

Can we either delay recording the startup metrics or setup some sort of metrics cache that is faster to initialize?

Assignee: nobody → mtighe

Dug into this a bit more. Travis from the Glean team thinks that most of the low-hanging fruit from improving Glean startup performance has already been done, and shared bug 1898810 as an example.

In regards to delaying startup metrics specifically, we may still have a couple options:

  1. We might be able to move some of them to pings that are sent later, so that we can avoid recording the data so early. This might be a case-by-case basis and would need individual investigation, and we'd need to be careful that no analyses depending on them appearing on specific pings.
  2. Glean begins the collection and submission of its baseline pings based on STARTED lifecycle events. They register a process lifecycle observer here. Process lifecycle observers move into the STARTED state the first time an activity moves into STARTED, which in the app-link case will mean that IntentReceiverActivity will kick off this collection and submission. If we can find a way to delay this until the HomeActivity instead, we may be able to get to a place where the view is at least drawn. I need to investigate more deeply whether the engine view is part of the first paint, or if we still run a risk of Glean triggering before we draw the engine.

My last comment was wrong, because we're looking at the metrics ping instead of the baseline ping. However, it sounds like we typically send the metrics ping with data from the previous run, which means we should be fine to punt on recording it until after the critical path completes.

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

Attachment

General

Created:
Updated:
Size: