This repository has been archived by the owner on Feb 20, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
MetricController.track
& Event.wrapper
may use non-trivial power: called frequently
#21292
Labels
Feature:Telemetry
meta
perf:P3
nice to have/meet (tracking only)
performance
Possible performance wins
Comments
mcomella
changed the title
Sep 14, 2021
GleanMetricsService.track
& Event.wrapper
may use non-trivial power: called frequentlyMetricController.track
& Event.wrapper
may use non-trivial power: called frequently
3 tasks
This issue will serve as a meta. I will link here the issues handling the removal of the wrapper in separate components. This will make QA work easier and ensure we do not have regressions by tackling the whole work in smaller pieces. |
This was referenced Mar 4, 2022
This was referenced Apr 11, 2022
This was referenced Apr 14, 2022
This was referenced Apr 15, 2022
mcarare
added a commit
to mcarare/fenix
that referenced
this issue
Apr 29, 2022
mcarare
added a commit
to mcarare/fenix
that referenced
this issue
Apr 29, 2022
mcarare
added a commit
to mcarare/fenix
that referenced
this issue
Apr 29, 2022
mcarare
added a commit
to mcarare/fenix
that referenced
this issue
May 2, 2022
mcarare
added a commit
to mcarare/fenix
that referenced
this issue
May 3, 2022
mcarare
added a commit
to mcarare/fenix
that referenced
this issue
May 3, 2022
mcarare
added a commit
to mcarare/fenix
that referenced
this issue
May 3, 2022
This can be closed as all |
mcarare
added a commit
to mcarare/fenix
that referenced
this issue
May 4, 2022
mcarare
added a commit
to mcarare/fenix
that referenced
this issue
May 5, 2022
mcarare
added a commit
to mcarare/fenix
that referenced
this issue
May 5, 2022
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Labels
Feature:Telemetry
meta
perf:P3
nice to have/meet (tracking only)
performance
Possible performance wins
MetricController.track
calls theEvent.wrapper
method, which is a long chain of comparisons, twice to submit telemetry. To test the impact of these methods, I did a simple workflow:I added custom markers and took profiles:
In these profiles of this simple workflow, we see:
MetricController.track
is called 19 times for a total duration of 57.3msEvent.wrapper
is called 36 times for a total of 24.3ms (I believe this is a subset of MetricController)window.filteredMarkers.map((m) => m.end - m.start).reduce((acc, i) => acc + i)
to measure this)These durations will be unnoticeable to the user, however, they will use battery. wrt
Event.wrapper
, this doesn't need to be a long chain of comparisons – perhaps by calling the Glean API directly and removingMetricController
– so we can stop the users' device from doing work it doesn't need to. We should investigateMetricController
for similar wins.wrt prioritization, there may be larger gains we can do to improve battery life (e.g. #15921) but those are likely harder to implement so it could be worth addressing this issue.
Note: #19967 may also address this issue.
The text was updated successfully, but these errors were encountered: