Open Bug 1372845 Opened 3 years ago Updated 3 years ago

Refactor TelemetryEnvironment to perform staged-gathering of data


(Toolkit :: Telemetry, enhancement, P3)




Tracking Status
firefox57 --- fix-optional


(Reporter: Dexter, Unassigned)


(Blocks 2 open bugs)


(Whiteboard: [measurement:client])

In bug 1367029, bug 1359031 and others we started noticing a new emerging pattern: environment feature X is expensive to query, wait until moment Y to query it.

We could make this staged approach explicit and refactor TelemetryEnvironment.jsm to query the system in 3 stages:

1) As soon as Firefox starts, on early initialization. This stage would fill the environment sections with all the data that it's performant and safe (e.g. does not slow down startup too much) to query early.
2) After the session is restored (windows & tabs). In this stage we would query features that are slightly less performant to query and might slow down startup, for example checking if the browser is the default browser.
3) After telemetry delayed init completes, which is 60s into the Firefox startup. All the heavy gatherings (addon extended info!) will belong to this stage.

This bug is about:

- refactoring TelemetryEnvironment to introduce the concept of stages;
- moving all the relevant measurements to the first stage;
- updating the docs (stages, etc.)
Blocks: 1201022
Priority: -- → P3
Blocks: 1372848
Whiteboard: [measurement:client]
You need to log in before you can comment on or make changes to this bug.