Performance/Android
From MozillaWiki
This page contains helpful resources relating to the performance of our Android apps.
Apps
- Android App Configurations
The Android apps are configured independently and so have different performance characteristics.
GeckoView is configured at initialization via GeckoRunTimeSettings https://mozilla.github.io/geckoview/javadoc/mozilla-central/org/mozilla/geckoview/GeckoRuntimeSettings.Builder.html
In addition GeckoSessionSettings can be modified to change the behaviour of individual browsing sessions.
App | Remote Debugging | Content Blocking | GeckoView is instantiated | Runtime settings configured here |
---|---|---|---|---|
geckoview_example | Enabled by default | Disabled: all tracking categories | App launch | https://searchfox.org/mozilla-central/rev/330daedbeac2bba296d663668e0e0cf248bc6823/mobile/android/geckoview_example/src/main/java/org/mozilla/geckoview_example/GeckoViewActivity.java#117-136 |
reference-browser | Disabled (can be enabled via UI) | Enabled: all tracking categories | App launch | https://github.com/mozilla-mobile/reference-browser/blob/cc77dc7627feb16d88e5a056eac43aeb9ec810b7/app/src/main/java/org/mozilla/reference/browser/components/Core.kt#L39 |
Focus/Klar | Not available. https://github.com/mozilla-mobile/focus-android/issues/3745 | Enabled: Ad trackers, analytics trackers, social trackers (UI to modify and add others) | First search | https://github.com/mozilla-mobile/focus-android/blob/20cd62cfd37935b8da6b65dd105f79099515fd32/app/src/main/java/org/mozilla/focus/web/GeckoWebViewProvider.kt |
Performance Measurements
- Gotchas
- Running the apps with Remote Debugging enabled can seriously degrade performance
- Swipe killing the apps will not kill the Gecko processes. Used adb force-stop, e.g. adb shell am force-stop org.mozilla.org.mozilla.geckoview_example