Move startup perf measurements to a background thread
Similar fix as done on Fenix: https://github.com/mozilla-mobile/fenix/pull/26165 Should avoid loading the Glean core library too early, but still records the data just fine.
Note that Focus doesn't record startup time, so nothing to delay there.
Fixes #7216
I haven't run that locally yet, so I'm not 100% sure if it addresses it all.
Pull Request checklist
- [ ] Tests: This PR includes thorough tests or an explanation of why it does not
- [ ] Screenshots: This PR includes screenshots or GIFs of the changes made or an explanation of why it does not
- [ ] Accessibility: The code in this PR follows accessibility best practices or does not include any user facing features. In addition, it includes a screenshot of a successful accessibility scan to ensure no new defects are added to the product.
QA
- [x] QA Needed
To download an APK when reviewing a PR:
- click on
Show All Checks, - click
Detailsnext tobuild-focus-debugorbuild-klar-debugfor changes targeting Klar, - click
View task in Taskcluster, - click the
Artifactsrow, - click to download any of the apks listed here which use an appropriate name for each CPU architecture.
GitHub Automation
Fixes #7216
Ok, the test fails so I need to look into this.
It doesn't fail for me locally.
See https://github.com/mozilla-mobile/fenix/pull/26544 for the Fenix fix for the tests.
Rebased and applied the same fix that Fenix did