App links performs packageManager query on main thread on every page load
Categories
(Firefox for Android :: General, defect)
Tracking
()
| Performance Impact | ? |
People
(Reporter: csadilek, Unassigned, NeedInfo)
Details
(Keywords: perf:pageload, top50)
From github: https://github.com/mozilla-mobile/android-components/issues/7416.
See:
- https://github.com/mozilla-mobile/android-components/blob/de4ac568cb3c376fec28e06189c5053a3f1d3b0b/components/feature/app-links/src/main/java/mozilla/components/feature/app/links/AppLinksInterceptor.kt#L81
- https://github.com/mozilla-mobile/android-components/blob/de4ac568cb3c376fec28e06189c5053a3f1d3b0b/components/feature/app-links/src/main/java/mozilla/components/feature/app/links/AppLinksUseCases.kt#L105
Ideally this code should run on a background thread. This will be a problem for PWAs too, which need a DB lookup. An async alternative might be needed.
┆Issue is synchronized with this Jira Task
Change performed by the Move to Bugzilla add-on.
Last we checked in January, this takes 8-30ms on every page load on the Moto G5 (via https://github.com/mozilla-mobile/android-components/issues/7416#issuecomment-1016902556).
NI self to set a performance priority or add to triage once the Performance Impact flag is added to the product (bug 1793646).
The Performance Impact Calculator has determined this bug's performance impact to be high. If you'd like to request re-triage, you can reset the Performance Impact flag to "?" or needinfo the triage sheriff.
Platforms: Android
Page load impact: Some
Websites affected: Major
[x] Bug affects multiple sites
Note: I ran the calculator by myself, outside of triage. My intuition says "Performance impact: High" seems excessive so I'll leave this in the triage queue.
Next steps
Some suggested next steps, since we filed this so long ago:
- Verify the delay still occurs and verify how long it takes
- See if the delay decreases over time, i.e. is it only slow for the first page load or is it slow for all of them? We'd expect the Android system to JIT common code so this step checks if it does. Perhaps this isn't as high of a priority if it's only slow once though we should always consider addressing anything that slows down pageload.
- If we still consider it to be high priority, address it.
Comment 3•3 years ago
|
||
The severity field is not set for this bug.
:cpeterson, could you have a look please?
For more information, please visit auto_nag documentation.
Updated•3 years ago
|
Updated•3 years ago
|
Comment 4•3 years ago
|
||
I profiled this, but couldn't see AppLinksInterceptor in the AndroidUI thread, and PackageManager calls didn't seem to happen at the time when they could block the page load. Am I missing something?
kaya, you might know something about this, or know who could profile this some more.
Comment 5•2 years ago
|
||
@smaug as there's been no response from @kaya. Is there somone else we can needinfo? Otherwise, perhaps we can close this as inactive?
Comment 6•2 years ago
|
||
Perhaps we can close this, and file a new bug if we still see the issue.
Description
•