Most mobile apps don't get slow in one dramatic release. They get slow one harmless-looking pull request at a time: a new SDK here, an extra network call at launch there, a bigger hero image on the home screen. For App Developers in San Francisco, where users tend to compare every app against the most polished products on their phone, that slow drift shows up in reviews long before it shows up in a sprint retro. A performance budget is the fix. It turns "the app feels sluggish" into numbers you can measure on every build and block in CI when they get worse.
This guide covers what to budget, how to measure each number on Android and iOS, and how to stop regressions before they reach users.
What a Performance Budget Actually Is
A performance budget is a short list of limits your app is not allowed to exceed. Each limit has three parts: a metric, a threshold, and a device or condition it is measured on.
"Cold start under 1.5 seconds" is not a budget. "Cold start, median of 10 runs, on a Pixel 6a, under 1.5 seconds" is a budget. The device and the method matter as much as the number.
Keep the list short. Five budgets that the whole team understands beat twenty that nobody checks. A reasonable starting set:
- Cold start time
- Frame rendering on your two or three busiest screens
- Download and install size
- Network payload during startup
- Background battery and wake behaviour
Cold Start Time
Cold start is the time from tapping the icon to the first useful frame, with the app process not already in memory. It is the first impression on every fresh launch, and it is the metric most likely to creep.
Google Play's Android vitals treats a cold start of five seconds or longer as excessive. That is a floor, not a goal. Most teams aim for well under two seconds on a mid-range device.
Common causes of slow starts are easy to name:
- Initialising every SDK in
Application.onCreate()orapplication(_:didFinishLaunchingWithOptions:) - Synchronous disk reads, such as loading a large config file or database on the main thread
- Blocking network calls before the first screen renders
- Heavy dependency injection graphs built eagerly
The fix is usually boring: defer what isn't needed for the first screen, move I/O off the main thread, and lazy-load SDKs like analytics and chat until after first frame.
Measuring cold start on Android
Jetpack Macrobenchmark is the tool to use. It launches your release build on a real device, kills it between runs, and reports startup timing.
@RunWith(AndroidJUnit4::class) class StartupBenchmark { @get:Rule val rule = MacrobenchmarkRule() @Test fun coldStart() = rule.measureRepeated( packageName = "com.example.app", metrics = listOf(StartupTimingMetric()), iterations = 10, startupMode = StartupMode.COLD ) { pressHome() startActivityAndWait() } } Pair this with Baseline Profiles. A Baseline Profile tells the Android runtime which classes and methods to compile ahead of time, so the code paths used during startup and key journeys don't run in interpreted or JIT mode on first launch. You generate the profile with BaselineProfileRule, ship it inside the app, and Google Play uses it at install time. It is one of the cheapest startup wins on Android, and Macrobenchmark lets you prove it by comparing runs with and without the profile.
The Android Studio profilers help when the number is bad and you need to know why. A system trace captured during launch shows exactly which calls block the main thread.
Measuring cold start on iOS
In Xcode, the App Launch template in Instruments shows each phase of launch, including time spent before main() and time spent building the first view. For automated measurement, XCTest has a launch metric:
func testLaunchPerformance() throws { measure(metrics: [XCTApplicationLaunchMetric()]) { XCUIApplication().launch() } } In production, MetricKit delivers launch time histograms from real devices through MXMetricManager, usually as a daily payload per device. Xcode Organizer shows aggregated launch time for users who share diagnostics with developers. Lab numbers tell you about regressions. Field numbers tell you what users actually feel. You need both.
Frame Drops and Jank
At 60 Hz, each frame has about 16.7 milliseconds. At 120 Hz, which many recent phones support, it has about 8.3 milliseconds. Miss that window and the user sees a stutter, which most people call jank.
Budget jank on specific screens rather than across the whole app. The feed, the search results list, and any screen with heavy animation are the usual suspects. A useful budget looks like "no frozen frames and a low share of slow frames while scrolling the home feed on our reference Android device."
Firebase Performance Monitoring reports slow frames (rendered slower than about 16 ms) and frozen frames (over 700 ms) per screen trace on both platforms. On Android, Macrobenchmark's FrameTimingMetric gives frame durations from a scripted scroll in the lab. On iOS, Instruments has Animation Hitches and Hangs instruments, and XCTest can measure scroll hitches with XCTOSSignpostMetric.scrollDecelerationMetric.
Typical causes:
- Doing image decoding or JSON parsing on the main thread
- Deep or overly nested layouts that take long to measure
- Recomposing or re-rendering a whole list when one item changes
- Large, unscaled images loaded into small views
App Size
App size is easy to ignore because developers usually install over fast office Wi-Fi. Users don't always have that luxury. A larger download can mean a lower install rate, more uninstalls when storage runs low, and slower updates.
On the App Store, apps above a size limit set by Apple trigger a prompt before downloading over cellular, and users can change that behaviour in Settings. On Google Play, the Android App Bundle format lets Play deliver only the code and resources each device needs.
Measure size the way the stores deliver it, not by the file sitting in your build folder:
- On Android, use
bundletool get-size totalagainst your.aaband a device spec, or the APK Analyzer in Android Studio to see which libraries and assets are heaviest. - On iOS, export with an App Thinning size report from Xcode. It lists the estimated download and install size for each device variant.
Set the budget as a maximum per-device download size and also as a maximum growth per release. The second rule catches the slow creep from new dependencies.
Network and Battery
Network and battery budgets are harder to measure in CI, but they still deserve numbers.
For network, budget the requests made before the first screen is usable: how many calls, and how many kilobytes. A startup that fires eight sequential API calls will feel slow on a weak cellular signal no matter how fast your servers are. Firebase Performance Monitoring captures network request traces automatically, including response time and payload size, so you can spot heavy endpoints in production.
For battery, the budget is mostly about behaviour: no wake locks held longer than needed, no frequent background polling, location requested at the lowest accuracy that works. Android vitals flags excessive wake locks and background Wi-Fi scans. Android Studio's power profiling tools and Battery Historian help you see what your app does while the screen is off. On iOS, MetricKit reports CPU time, location activity and other energy-related metrics, and the Energy section in Xcode Organizer shows reports from the field.
How to Pick the Numbers
The hardest part of a budget is choosing the thresholds. A few rules make it easier.
Start from today's numbers. Measure your current release on your reference devices. Your first budget is "no worse than this, plus a small tolerance." Then tighten it over time.
Pick a realistic reference device. Bay Area teams often test on the newest flagship phones, because that is what the team carries. Your users, even in tech-heavy markets, include people on three-year-old mid-range Android phones. Pick at least one mid-range Android device and one older supported iPhone as the reference hardware.
Use medians and percentiles, not single runs. Startup time varies run to run. Take the median of 10 or more runs in the lab, and look at the 90th percentile in field data.
Add tolerance for noise. A budget that fails on random variance will get ignored or disabled within a month. A tolerance of a few percent over the baseline is usually enough to keep CI quiet unless something real changed.
Write the budget down where the code lives. A small config file in the repo works well:
# perf-budget.yml android: cold_start_median_ms: 1400 download_size_mb: 28 max_size_growth_mb_per_release: 1.5 ios: cold_start_median_ms: 1200 download_size_mb: 35 startup_network: max_requests: 4 max_kb: 250 Enforcing Budgets in CI
A budget nobody checks is a wish. The point is to make the pipeline say no.
Size checks on every pull request
Size is the easiest budget to automate because it doesn't need a physical device. Build the release bundle, run bundletool get-size total or parse the App Thinning report, compare against the budget file, and fail the job when the number goes over. Post the size difference as a comment on the pull request so the author sees it before review.
Startup and frame checks on real devices
Performance tests on emulators and simulators are unreliable, because they share CPU with the host and don't behave like phones. Run Macrobenchmark and XCTest performance tests on physical devices. Options include Firebase Test Lab, a cloud device farm, or a few devices plugged into a self-hosted runner.
Device runs are slower and cost more, so many teams split the work:
- Size checks run on every pull request.
- Startup and frame benchmarks run nightly on
main, and on release branches before submission. - A failed nightly run opens a ticket automatically with the commit range since the last good run.
Xcode can store a baseline for each measure block and fail the test when a result drifts past it. On Android, Macrobenchmark writes JSON output that a short script can compare against your budget file.
Watch the field after release
Lab checks catch most regressions, but not all. Some only appear on specific devices or OS versions. After each release, check Android vitals, Xcode Organizer, MetricKit payloads and Firebase Performance dashboards for startup time, slow and frozen frames, and ANRs or hangs. Staged rollouts give you time to spot a regression while it still affects a small share of users.
Keeping the Budget Alive
Budgets decay when they become someone's side project. A few habits help:
- Give each budget an owner. One person, not "the mobile team."
- Review numbers in a short monthly check, and tighten thresholds when you have room.
- Require a written reason when someone raises a budget, in the same pull request.
- Treat every new SDK as a performance change. Measure startup and size before and after adding it.
That last one matters a lot. Analytics, attribution, chat and ad SDKs are frequent sources of slower launches, and each one feels small on its own.
How Appagentix Can Help
Some teams have the time to build all of this in-house. Others are busy shipping features and know their performance tooling is thin. Appagentix approaches mobile app projects around the product's purpose and user requirements, and performance is part of that conversation from the start. For an existing app, that can mean auditing cold start and size, adding Baseline Profiles, setting up Macrobenchmark and XCTest performance runs on real devices, and writing a budget file the team owns. The aim is a setup your own engineers can read, run and adjust without outside help.
Conclusion
Performance budgets work because they make slow drift visible. Pick a handful of metrics, measure them on realistic devices, store the limits in your repo, and let CI reject changes that break them. Then watch field data after every release, because users will always find devices you didn't test. For App Developers in San Francisco building for demanding users, a budget that runs on every build is far cheaper than a one-off performance push after the reviews turn sour.

