Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Arresting Android Vitals

Arresting Android Vitals

Arresting Android Vitals

Vishal Arora

October 05, 2023
Tweet

Transcript

  1. What are Android Vitals? • Initiative by google to improve

    technical quality of apps. App Startup Time Excessive Device Wakeups Permission Denials Frozen Frames Slow Rendering Excessive Wakelocks Other Vitals Core Vitals User Perceived ANR Rate User Perceived Crash Rate
  2. Why are Android Vitals Important? • Key indicator of the

    overall user experience. • Bad behaviours a ff ect visibility of your application on play store. • Bad behaviours a ff ect existing users and ability to acquire prospective users.
  3. Why arresting Android Vitals is Important? • Google Play evaluates

    core vitals daily on a 28-day rolling average basis. • Fixes/Optimisations and rollout take signi fi cant time. • Reactive Process.
  4. App Startup Time • It is the duration application takes

    to load and become functional. Cold Start Application starts from scratch ( > 5 sec ) Warm Start Application Process is running in background ( > 2 sec ) Hot Start Application UI is alive in background ( > 1.5 sec )
  5. How can we arrest App Startup Time ? • Monitor

    warnings and reports on play console dashboard. • Macrobenchmarking - Measures large user interactions such as startup, . interactions with UI and animations. Control the performance Environment. Control the mode of compilation. Start and Stop the app to measure actual startup time.
  6. Baseline Profiles API AOT (Ahead of time) JIT (Just in

    time) < 5 (Lollipop) 5 & 6 (Marshmallow) >=7 (Nougat) >=9 (Pie) + Cloud Pro fi les
  7. What are Baseline Profiles? • It is a fi le

    containing the list of classes and methods which should be compiled to machine code • They are shipped with the apk.
  8. Automate Arrest • Macrobenchmark library stores the test results in

    a json fi le. • Run the benchmarking tests in CI/CD. • Makes the monitoring process proactive.
  9. Summarise • Android Vitals and their importance • App Startup

    Time • Measure - MacroBenchmark Library • Improvement - Baseline Pro fi les ~ 20% • Measure - CompilationMode.None vs CompilationMode.Partial • CI/CD • https://github.com/arora-vishal/Benchmarking.git