Startup time & app size
Cold/warm/hot start, deferring init work, baseline profiles, and shrinking the binary (R8, app thinning). Startup time is a ranked Play Store / App Store signal.
The mental model
Startup time is the tax the user pays before they can do anything, and they notice every millisecond of it because they are staring at a splash screen with nothing to do. The mental model is a restaurant kitchen at three states of readiness. A cold start is opening the restaurant in the morning: the ovens are off, ingredients are in the walk-in, staff haven't arrived — everything must spin up before the first plate goes out. A warm start is coming back from a lunch break: the ovens are warm, staff are around, but the current order was cleared. A hot start is the customer who never actually left: the plate is basically still on the pass. The OS gives you the same three: cold (process created from scratch), warm (process alive, activity/scene recreated), hot (already in memory, brought to front). Cold is the one that hurts and the one you optimize.
The single idea that reframes the whole problem: **everything you do before the first frame is on the critical path, and the user is blocked the entire time.** Every SDK you initialize in Application.onCreate / application(_:didFinishLaunching:), every synchronous config fetch, every eager database open, every dependency-injection graph you build up front — it all runs *before* the user sees usable content, serialized, on the main thread. The discipline of fast startup is ruthless triage: what actually has to run before the first frame, and what can wait? Most of what teams cram into startup does not need to be there; it's there because "init at launch" was the path of least resistance.
Why it matters beyond feel: startup time is a visible store metric and a retention lever. Android vitals in Play Console flags cold starts of ~5s or more, and Xcode Organizer reports launch time on iOS. Any direct effect on store ranking is not confirmed. A slow first experience matters regardless, and a slow first experience on a budget device over a 2G/3G connection directly costs day-1 retention — which is exactly the market where a synchronous eleven-SDK init block turns a 2-second start into a 6-second one.
- Deep dive
- Internal architecture
- Real-world use cases
- Best practices
- Common mistakes
- Performance
- Security
- Production troubleshooting
- Advantages & disadvantages
- Alternatives
- Interview expectations
- Interview questions
- Facts to remember
- Cheat sheet
- Quick revision