In brief
Mobile app performance comes down to three measures users feel without any tools: cold start time, smooth scrolling and animation, and battery usage. On Android, smooth rendering at 60 frames per second means drawing each frame in under 16 ms, and a main thread blocked for 5 seconds on a touch ends in an ANR error. Measure on real devices, including low-end ones, in a release build, and confirm results with data from users' phones: Android vitals and MetricKit.
Three measures users notice
| Measure | What it means | How to measure it |
|---|---|---|
| Startup time | from tapping the icon to a screen where you can do something | Android: TTID and TTFD; iOS: Instruments, App Launch template |
| Smoothness | frames drawn on time while scrolling and animating | Android: slow frames and jank; iOS: hangs and hitches |
| Responsiveness | reaction time to touch, no blocked main thread | Android: ANRs; iOS: hangs in Xcode Organizer |
| Battery and network | background work, wakeups, data transfer | Android vitals; MetricKit and Xcode Organizer |
This is the native-app counterpart of Core Web Vitals: a few measures that describe user experience instead of a single lab number.
Startup time: cold, warm and hot
The Android documentation distinguishes three kinds of start. In a cold start the system creates the app process from scratch, for example after the phone reboots or after the system has killed the app. In a warm start the process may still exist, but the activity has to be recreated. In a hot start the system just brings the app to the foreground. Google recommends optimizing for cold start, because that improves the other two as well.
Android measures two values. TTID (time to initial display) is the time to the first frame; the system logs it in logcat as a `Displayed` line. TTFD (time to full display) is the time until the screen has its data and is usable. The app reports it itself with `reportFullyDrawn`; without that call, TTFD is not measured.
On iOS, the Apple documentation notes that if launch takes too long, the system watchdog may terminate the app. The App Launch template in Instruments collects a time profile and thread states during launch for analysis.
The most common causes of slow startup in banking and service apps:
- initializing a dozen libraries (analytics, crash reporting, ads, feature flags) in the Application class or app delegate instead of lazily on first use,
- reading from disk, deserializing a large configuration or querying a database on the main thread,
- a network request the first screen waits for, instead of cached data refreshed in the background,
- a deep view hierarchy and decoding large images before the first frame.
Android adds code compilation to the picture. Baseline Profiles shipped with the app let the ART runtime compile the listed code paths ahead of time; the documentation says they improve code execution speed by about 30% from the first launch.
Smoothness and responsiveness
The Android documentation states that at 60 frames per second each frame must be produced in under 16 ms. When a frame misses that deadline, the system skips frames and the user sees stutter (jank). Devices with 90 Hz and 120 Hz screens have even less time per frame.
A blocked main thread is worse. Android reports an ANR (Application Not Responding) when, among other cases, the app does not respond to a touch or key press within 5 seconds. Typical causes listed in the documentation are I/O and long calculations on the main thread, synchronous calls to other processes and waiting for a lock held by another thread. On iOS the equivalent is hangs, which Xcode Organizer collects from users' devices.
The fix follows the same rule on both platforms: the main thread only draws and handles touch. Sorting a list, parsing a response, encryption and database writes move to background threads, and the UI receives ready-made state.
Battery and network usage
The radio, background CPU work and GPS drain the battery most. In business apps the usual culprits are:
- polling the server every few seconds instead of using push notifications,
- many small requests instead of one batched request, because each one wakes the radio,
- background jobs running more often than the business needs and wake locks held too long,
- high-accuracy location where approximate location would do.
Android limits background work with Doze and App Standby: when the device sits unused for a long time, the system defers apps' background network and CPU access. An app that relies on background work, such as syncing readings from an energy meter, must behave correctly after being deferred. Schedule background work through WorkManager on Android and the system's background task mechanisms on iOS, not with custom timers.
The lab and data from users' devices
Lab measurements use a release build, not debug, on real devices, including lower-end models popular with your customers. An emulator is good for checking features but does not reproduce a phone's CPU, memory or modem; choosing devices is covered in the article on mobile app testing. For repeatable startup and scrolling measurements, use the Macrobenchmark library on Android and XCTest performance tests on iOS. Guard the result in CI as a budget, for example cold start on a chosen device.
Data from users' devices shows what the lab cannot. Android vitals in the Google Play Console collects, with users' permission, data on stability, performance and battery use. On iOS, MetricKit delivers reports to the app at most once per day with metrics from the previous 24 hours, and diagnostic reports arrive immediately on iOS 15 and later. Read the results as percentiles and by device model, because an average hides weak phones, as we explain in the article on percentiles instead of averages.
How to combine performance testing with regression automation on both platforms is shown in the project on automating regression testing of a bank's mobile app on iOS and Android, and banking specifics in the article on mobile banking apps.
Questions and answers
How do I measure app startup time on Android?
The simplest way is logcat: the system logs a `Displayed` line with the time to first frame (TTID). The command `adb shell am start -S -W` restarts the app and prints the timings in the terminal. Time to full display (TTFD) requires calling `reportFullyDrawn` in the app. For repeatable measurements in CI, use the Macrobenchmark library.
What is an ANR and how do I avoid it?
An ANR, or Application Not Responding, is an error Android reports when the main thread is blocked for too long, for example when the app does not respond to a touch within 5 seconds. You avoid it by moving disk, network and heavy computation to background threads and making sure the main thread never waits on locks.
Why does the app run smoothly on the emulator but stutter on a customer's phone?
Because the emulator uses the computer's CPU and memory, while the customer's phone may be several years older, have less memory and run other apps in the background. Measure smoothness on real devices in a release build and compare the result with Android vitals or MetricKit data for the most popular models.
What drains the battery most in a mobile app?
Usually the radio and background work: frequent server polling, many small requests, jobs that run too often and precise location. Switching to push notifications, batching requests, scheduling work through system mechanisms and using approximate location where it is enough all help.
Sources
- App startup time, Android Developers
- ANRs, Android Developers
- Slow rendering, Android Developers
- Baseline Profiles overview, Android Developers
- Optimize for Doze and App Standby, Android Developers
- Android vitals, Android Developers
- Reducing your app’s launch time, Apple Developer
- MetricKit, Apple Developer