In a music-streaming phone app, what do cold, warm and hot starts each rebuild, and why budget the cold start?
answer
- what survived since the last use?
- process, object graph, first screen
- one platform says launch or resume
- after a reboot or an OS kill
- cold is the superset, so budget it
basics
~20 sA cold start creates the process, builds the app's object graph and draws the first screen; a warm start redoes part of that; a hot start brings a still-resident app forward. Budget the cold start, because it does all the work.
solid answer
~50 sName each start by what must be rebuilt. A **cold start** creates the app's process, builds its object graph (the services, repositories and SDKs the app wires together) and then draws the first screen; it follows a reboot, a fresh install, or the OS ending the process to reclaim memory. A **warm start** does a subset of that, and the platforms draw the line differently: on one, it covers a live process whose screen must be rebuilt, or a killed process restarted with a little saved state; on the other, a "warm launch" starts a new process but finds the system libraries it needs still in memory. A **hot start** (the other platform calls it a resume) brings a process that is still in memory to the front. Budget the cold start: it is the superset, so every cut there also shortens the other two.
go deeper
Recall the three things a start may have to rebuild (the process, the app's object graph, the first screen) and say which start rebuilds all three and when it happens.
Explain where the platforms differ: one names cold, warm and hot; the other speaks of launch versus resume and treats warm and cold as a spectrum. Then say why cold is the case to budget.
Tie start types to the product: how often this app really starts cold, why metrics must be split by start type, and how memory trimmed in the background makes even a hot start do work.
Frame launch types as a shared vocabulary for many teams: one definition by what is rebuilt, used by every dashboard and budget, so no team improves a blended number while cold starts regress.
## Name a start by what it must rebuild A *launch* is everything between the user's tap (on the icon, a notification, or a lock-screen control) and a screen they can use. How long it takes depends less on the tap than on **what survived since the app was last used**. Three things may or may not still exist: - **The process**: the operating-system container the app's code runs in. Creating it means loading the executable and its libraries before any of the app's own code runs. - **The object graph**: the app's own wiring, such as the player, the playlist repository, the account session and the third-party SDKs, each constructed and connected to the others. - **The first screen**: its layout built, its data loaded, its first frame drawn. | Start | Process | Object graph | First screen | Typical cause | |---|---|---|---|---| | **Cold** | created | built from nothing | built and drawn | first launch after a reboot or install; the OS ended the process to reclaim memory | | **Warm** | created or reused, depending on the platform | partly rebuilt | rebuilt | the user backed out; or the process ended recently, leaving saved state or warm system caches | | **Hot** (a *resume*) | still running | still in memory | brought to the front | the user switched away briefly | ## How the two platforms draw the lines The words are shared, but the boundaries are not, and a design answer should not teach one platform's version as the rule. 1. On one platform, launches are formally **cold, warm or hot**. A warm start there covers two situations: the process is still running but the screen must be recreated, or the system evicted the app and the process restarts with a small bundle of saved state. 2. On the other platform, an activation is either a **launch** (a process must start) or a **resume** (a process is alive, even if suspended). Its guidance treats *warm* and *cold* launches as a **spectrum**. A warm launch still starts a process, but the system frameworks it depends on are likely still in memory. A cold launch, after a reboot or after a memory-hungry app pushed everything out, may have to page those in from disk. That guidance even notes that force-quitting the app and launching it again produces a warm launch. 3. Under a cross-platform framework, both stories apply, plus the framework's own engine or runtime start-up on the cold path. The portable version is the table above: say what is rebuilt, not which label applies. ## Why the cold start is the budget - **It is the superset.** Every step of a warm or hot start also happens in a cold one, so work removed from the cold path speeds the others too. One platform's launch guidance says outright to optimise on the assumption of a cold start. - **It is not rare.** Phones do not keep apps in memory until the user closes them. Under memory pressure the OS ends background processes, so a music app opened in the morning to resume last night's track is often starting cold. - **The launch screen does not hide it.** The OS shows a placeholder while the process starts, but the user is still waiting, and a long enough wait makes them leave. - **Third-party code lands here.** Every SDK set up at launch and every library loaded at process start adds to the cold path. ## Hot starts still cost something A hot start is cheap only if what the app left in memory is still there. If the OS asked the app to release memory while it was in the background, the objects it dropped must be rebuilt when the user returns. A design that frees caches under pressure should rebuild them lazily, when a screen needs them, not all at once on return. ## What this means for the music app For an app opened mostly to resume playback, the budget question is concrete: on a cold start, how long until the first frame, and how long until the now-playing bar shows the last track and the play button works? Both are cold-start numbers. Measuring them separately from warm and hot starts matters, because a release that leaves more processes alive produces more hot starts and can lower a blended launch number while cold starts quietly get slower.
- Is every start that creates a new process equally slow?No. Creating the process means the app's own work, its object graph and first screen, is done in full, but the system's share varies. On one platform, a launch soon after the last use finds the libraries it depends on still cached, while one after a reboot or after a memory-hungry app must page them in from disk. Treat starts as a spectrum and test on devices in realistic states.
- Can a hot start still have work to redo?Yes. If the OS asked the app to release memory while it was in the background, the objects it freed must be recreated when the user returns, so a hot start can cost more than expected. Rebuild dropped caches lazily, when a screen needs them, rather than eagerly on return.
Opening a cafe: a cold start is unlocking in the morning, switching on the ovens and doing the prep before the first coffee; a warm start is reopening after a break with the ovens still hot but the counter reset; a hot start is turning back to a customer whose cup is already poured. Plan for the morning opening, because every other case is part of it.
- A warm start always means the app's process was still running.
- Cold starts are rare because phones keep apps in memory until the user closes them.
- A hot start never has to redo any initialisation work.
- Cold, warm and hot mean exactly the same thing on every mobile platform.
- A cold start begins when the app's own start-up code runs.