Mastering Android Performance: Measure, Optimize, and Ship Fast Apps

· Sivavishnu R
Ebook
460
Pages

About this ebook

Stop guessing why your Android app is slow. Measure it, find the real cause, fix it, and make sure it stays fixed.

Most Android performance advice stops at a list of tips. Mastering Android Performance teaches the discipline behind them. You'll learn how to measure a problem correctly, trace it to its actual cause, fix it, and lock the fix in with automated checks so it never quietly comes back. The book covers every layer of an app, from the first frame of a cold start to the thermal limits of a phone that has been busy for an hour.

Every chapter opens with an incident at FreshCart, a fictional grocery-delivery app built from failure patterns common in real production apps. Each one follows the problem from symptom to trace to fix, with concrete before-and-after numbers.

What you'll learn:


How Android really runs and renders your app: Zygote, ART, garbage collection, the main thread, and the frame pipeline

Measuring correctly with Android Studio profilers, Perfetto, Macrobenchmark and real-user field data

Cutting startup time with lazy initialization, App Startup, and Baseline and Startup Profiles

Finding and fixing ANRs, main-thread stalls, lock contention and thread explosions

Smooth rendering in both Views and Jetpack Compose, including stability, strong skipping and compiler reports

Memory leaks, process death, and designing for low-RAM and Android Go devices

Battery, network and storage efficiency, including WorkManager and the Android 12–16 foreground service rules

R8, app size, build speed, and CI gates that catch regressions before release

The topics most books skip: native code and the mandatory 16 KB page size, on-device AI with LiteRT and Gemini Nano, and thermal-aware adaptive performance

Built to be used, not just read. All 32 chapters end with a hands-on lab you run against your own app on a real device, plus pitfalls, a checklist, exercises and version notes. Four appendices give you a command cheat sheet, 20 ready-to-use Perfetto SQL queries, performance checklists and a full metric reference to keep open at your desk.

Who this book is for: Android developers comfortable with Kotlin and either Views or Jetpack Compose. No prior profiling experience is needed; Part I builds the mental model every later chapter depends on.

Stop guessing why your Android app is slow. Measure it, find the real cause, fix it, and make sure it stays fixed. Most Android performance advice stops at a list of tips. Mastering Android Performance teaches the discipline behind them. You'll learn how to measure a problem correctly, trace it t...

Discover more

Rate this ebook

Tell us what you think.

Reading information

Smartphones and tablets
Install the Google Play Books app for Android and iPad/iPhone. It syncs automatically with your account and allows you to read online or offline wherever you are.
Laptops and computers
You can listen to audiobooks purchased on Google Play using your computer's web browser.
eReaders and other devices
To read on e-ink devices like Kobo eReaders, you'll need to download a file and transfer it to your device. Follow the detailed Help Center instructions to transfer the files to supported eReaders.