How to Improve Mobile App Startup Time: Practical Wins for iOS & Flutter
Apple’s guidance since WWDC 2019 is to show your first frame within 400ms of the tap, and the watchdog kills any app still launching after about 20 seconds. Google Play flags a cold start of 5 seconds or more as excessive. Most apps sit between those numbers because of work that runs at launch and did not need to.
Below: how I measure launch on iOS and Flutter, the usual causes, and the fixes in the order they pay off. The same eager-initialization problem shows up mid-migration, covered in the SwiftUI migration playbook; for the cross-platform trade-offs behind the Flutter numbers, see Flutter vs React Native.
Quick Navigation
Measure First: Cold vs Warm Start
Cold and warm starts have different causes and different fixes. Decide which one you are chasing before you open a profiler.
Cold Start
The process does not exist yet. The system maps the binary and its dynamic libraries, runs static initializers, calls UIApplicationMain, then didFinishLaunchingWithOptions, then renders the first frame. Almost all of the avoidable cost lives here.
Target: first frame under 400ms, first useful content under 1s
Warm Start
The process is still in memory and returns to the foreground. Only sceneWillEnterForeground and sceneDidBecomeActive run, so a slow warm start is almost always a token refresh or sync someone put in one of those callbacks.
Target: interactive within 200ms
One trap for home-made timers: since iOS 15 the system may prewarm your app, running the process up to just before main() long before the user taps the icon, so a timer started at process launch reports multi-second starts nobody experienced. Check ProcessInfo.processInfo.environment["ActivePrewarm"] and discard those samples, or use MetricKit, which already accounts for it.
Profiling: Find the Real Bottleneck First
Profile a release build on the slowest device you still support, with the app force-quit first. A debug build on this year’s iPhone tells you nothing about the problem your users have.
iOS: Instruments
- In Xcode choose Product, then Profile, and pick the App Launch template. It pairs Time Profiler with a launch-phase track, so pre-main,
didFinishLaunching, and first frame show as separate spans. - In the post-main span, sort by weight. The usual suspects are synchronous disk reads, JSON decoding, Core Data setup, image decoding, and SDK initializers on the main thread.
- Wrap your own startup steps in
OSSignposterintervals so they appear as named regions in the same trace. - For a repeatable number in CI, add a UI test that calls
measure(metrics: [XCTApplicationLaunchMetric()]); it launches the app several times and reports mean and deviation.
DYLD_PRINT_STATISTICS, which older guides recommend, stopped working with the dyld rewrite in iOS 15. The App Launch template is the replacement.
Flutter: DevTools
- Run
flutter run --profile --trace-startup. It writesstart_up_info.jsonto the build directory withtimeToFrameworkInitMicros,timeToFirstFrameMicros, andtimeToFirstFrameRasterizedMicros. - In DevTools, open the Performance tab and turn on “Track widget builds” to see what the first frame spends its time building.
- Wrap your own initialization in
Timeline.startSync/Timeline.finishSyncfromdart:developer. - On Android,
adb shell am start -WprintsTotalTimefor a cold start as the OS sees it, which is what Play Console judges you on.
iOS-Specific Optimizations
Reduce Pre-Main Time (dylib loading)
- Count your non-system dynamic frameworks. Apple’s guidance since WWDC 2016 is about six or fewer; a CocoaPods project with
use_frameworks!often ships thirty. - Link statically. Swift packages linked from Xcode are static by default; for CocoaPods use
use_frameworks! :linkage => :static. Static code is part of the main binary and costs nothing extra at load. - On Xcode 15 and later, enable Create Merged Binary (
MERGED_BINARY_TYPE) on the app target. Release builds fold your frameworks into the app; debug builds keep them separate so incremental builds stay fast. - Find Objective-C
+loadmethods and C++ static initializers in your code and third-party SDKs. They run beforemain(); move the work to+initializeor first use.
None of this argues against modularizing. Feature code split into local Swift packages, as in a white-label iOS architecture built on module boundaries, keeps launch cheap as long as those packages link statically rather than as dynamic frameworks.
Optimize AppDelegate & SceneDelegate
- Start the crash reporter first, synchronously. Everything else in
didFinishLaunchingWithOptionsis a candidate for deferral. - Move analytics, attribution, experiments, and chat SDKs to after the first frame: a one-shot call from the first screen’s
viewDidAppear, or a.taskon the root SwiftUI view. - Be careful with
DispatchQueue.global().asyncfor SDK setup. Many SDKs require the main thread to configure, and some crash if two threads touch them during init.
func application(_ application: UIApplication,
didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool {
CrashReporter.start() // first, synchronous
Dependencies.shared.bootstrapMinimal() // only what the first screen needs
return true
}
// Called once from the first screen after it is on screen
func deferredStartup() async {
await Analytics.shared.start()
await FeatureFlags.shared.refresh()
SupportChat.configureIfNeeded()
}First Screen Rendering
- Render something real immediately: the cached list, or a skeleton that matches its layout. A blank screen while data loads reads as a slow launch even when the launch was fast.
- Keep
viewDidLoadfree of disk and decode work. Layout has to happen on the main thread; the reading, parsing, and image decoding that feed it do not. - Decode images off the main thread with
UIImage.byPreparingForDisplay()orbyPreparingThumbnail(ofSize:)(iOS 15+) before handing them to aUIImageView. - In SwiftUI, load with
.taskrather thanonAppearplus a detachedTask. It still runs on the main actor, but it is cancelled when the view disappears, which stops wasted work during fast navigation at startup.
Flutter-Specific Optimizations
Reduce Engine Initialization
- Do not
awaita chain of initializers inmain()beforerunApp(); each one delays the first frame. Run a shell that shows cached state and start Firebase, databases, and remote config from the first widget’sinitState. - In add-to-app projects, create the
FlutterEngineindidFinishLaunchingWithOptionsand callrun()so it is warm before the user reaches a Flutter screen. UseFlutterEngineGroupfor more than one engine; engines in a group share resources and start far faster. - Deferred components (
deferred asimports plus Play Feature Delivery) are Android-only. On iOS the same code compiles and loads eagerly.
Widget Tree Optimization
- Keep the first-frame tree shallow.
IndexedStackbuilds every child up front, so build heavy tabs on first visit and keep them alive afterwards. - Use
constconstructors wherever the compiler allows. Aconstwidget is built once and skipped on rebuilds, which matters most while the first frames settle. - Use
ListView.builderorSliverListfor anything longer than a screen. AColumnof 200 children builds all 200 for the first frame. RepaintBoundarycaches a subtree’s rasterized layer, not its build output. It helps when a static region sits beside an animation; it does nothing for build cost.
Release Build Flags
- Measure only in
--profileor--release. Debug builds run Dart in JIT mode with asserts on; their startup numbers bear no relation to what ships. --split-debug-info=<dir>moves symbols out of the binary into files you keep for symbolication. Smaller binary, same crash reports.--obfuscaterequires it and is a hardening measure, not a startup one.- Icon tree shaking is on by default in release and fails the build on non-constant
IconData. Fix the call site rather than passing--no-tree-shake-icons.
Target Numbers & How to Track Them
| Metric | Target | Basis |
|---|---|---|
| Cold start to first frame (iOS) | under 400ms | Apple, WWDC 2019 “Optimizing App Launch” |
| Cold start to first useful content | under 1s at p90 | My working budget, measured on the oldest supported device |
| Cold start (Android) | well under 5s | Play Console flags 5s or more as excessive |
| Warm start to interactive | under 200ms | Past this a resume feels like a relaunch |
Track in Production
- MetricKit:
MXAppLaunchMetricdelivers daily histograms of time to first draw and resume time, no SDK and no prewarming bias. The Xcode Organizer shows the same data under Launch Time. - Firebase Performance: records an automatic app start trace on both platforms, the quickest way to get Flutter percentiles.
- Your own marker: one event when the first screen has real content, measured from
didFinishLaunchingrather than process start, tagged with device model and OS. Read p75 and p95, not the mean; the complaint comes from the p95 user on a four-year-old phone. - Run the
XCTApplicationLaunchMetrictest in CI against a baseline and fail the build on a regression over about 10%. Catching it in the PR is cheap; finding it in MetricKit two releases later is not.
Quick Win Priority List
- Profile a release build on your slowest supported device with the App Launch template; note which phase is slow before changing anything.
- Move every SDK except the crash reporter out of
didFinishLaunchingWithOptions. - Render the first screen from cache and refresh behind it.
- Count non-system dynamic frameworks; link them statically or merge them.
- Collapse sequential startup requests into one, or fire them concurrently.
- Put
XCTApplicationLaunchMetricin CI and watchMXAppLaunchMetricin production.

Written by Puneetpal Arneja
Senior iOS, Web & Software Developer · 13+ years building apps and software
I've shipped 18+ mobile applications across banking, healthcare, and consumer products — including work for Citibank, Apple, PNC, and Albertsons. Everything here comes out of production work, not theory.
Struggling with Slow App Startup?
I offer performance audits for iOS and Flutter apps: profiling, finding the root causes, and implementing the fixes. Most apps have obvious wins left on the table, and the biggest one is usually visible in the first trace.