Cold Start vs Warm Start vs Hot Start in Android

Have you ever noticed that an Android app takes a few seconds to open after you restart your phone, but opens almost instantly when you switch back to it from the recent apps screen?

That difference is not random. It is closely related to three Android app launch scenarios:

  1. Cold start — Android has to start the app process.
  2. Warm start — The app process exists, but the activity needs to be created or recreated.
  3. Hot start — The existing activity is brought back to the foreground.

Understanding these states helps Android developers identify startup bottlenecks, choose the right optimizations, and build an app that feels responsive.

Let's use one familiar example throughout this article: a shopping app similar to Amazon or Flipkart.

1. Cold start: starting the app from scratch

A cold start occurs when the app's process is not running. Android must create a new process before it can display the app.

Real-world scenario

Imagine that you restarted your phone. You tap your shopping app's icon for the first time.

The app process is not in memory, so Android needs to:

  1. Create the Linux process for the app.
  2. Create the Application object and call Application.onCreate().
  3. Create the launch activity.
  4. Run the activity lifecycle callbacks.
  5. Inflate or compose the initial UI.
  6. Draw the first frame on the screen.

The exact work depends on your app architecture, dependencies, and startup code.

A simplified code example

class ShoppingApplication : Application() { override fun onCreate() { super.onCreate() // Keep only essential, lightweight initialization here. initializeCoreDependencies() } private fun initializeCoreDependencies() { // Example: initialize dependencies required immediately. } } 
class MainActivity : ComponentActivity() { override fun onCreate(savedInstanceState: Bundle?) { super.onCreate(savedInstanceState) setContent { ShoppingApp() } } } 

The important point is that Application.onCreate() runs when a new app process is created. It is not called every time the user returns to an already-running app.

A common startup mistake

Developers sometimes put too much work into Application.onCreate():

  • Synchronously opening a database
  • Reading large files
  • Making blocking network calls
  • Initializing every SDK immediately
  • Loading data that is not needed for the first screen

This can delay the first frame and make the app feel slow.

How to improve cold start

  • Keep Application.onCreate() lightweight.
  • Initialize non-critical SDKs lazily or later.
  • Do not perform network requests on the main thread.
  • Avoid expensive disk operations on the main thread.
  • Show useful initial content instead of waiting for every API response.
  • Use the AndroidX App Startup library only where it simplifies and controls initialization; it does not automatically make startup faster.
  • Measure startup before and after each change.

Practical example: Render the shopping home screen with locally available structure and cached content first. Load recommendations and secondary sections asynchronously.

2. Warm start: the process exists, but the activity must be created

A warm start occurs when the app process is already running, but Android needs to start a new activity or recreate an activity before the user can interact with the app.

Real-world scenario

You open the shopping app and view a product. You navigate away from that activity, but the app process remains alive. Later, you open the app again through a notification or another entry point.

Android can reuse the existing process, but it still needs to create the target activity.

The process does not need to go through the full process-creation path again. However, activity creation and UI rendering still take time.

Simplified lifecycle example

class ProductActivity : ComponentActivity() { override fun onCreate(savedInstanceState: Bundle?) { super.onCreate(savedInstanceState) setContent { ProductScreen() } } override fun onStart() { super.onStart() // Activity becomes visible. } override fun onResume() { super.onResume() // Activity enters the foreground and becomes interactive. } } 

Restore the user's UI state

Suppose the user was viewing a product with:

  • Product ID: 1024
  • Selected color: Black
  • Quantity: 2

If Android recreates the activity, the user should not have to make those selections again.

For small UI state, a SavedStateHandle in a ViewModel is useful:

class ProductViewModel( private val savedStateHandle: SavedStateHandle ) : ViewModel() { var productId: Int get() = savedStateHandle["product_id"] ?: 0 set(value) { savedStateHandle["product_id"] = value } var quantity: Int get() = savedStateHandle["quantity"] ?: 1 set(value) { savedStateHandle["quantity"] = value } } 

SavedStateHandle is intended for lightweight state, not large objects or complete application data. Persist important business data in an appropriate storage layer.

How to improve warm start

  • Keep activity creation efficient.
  • Restore only the state needed by the screen.
  • Avoid repeating expensive initialization unnecessarily.
  • Reuse process-level dependencies where appropriate.
  • Avoid unnecessary API calls when valid cached data is available.
  • Keep the first frame independent of non-essential work.

Practical example: When the user opens a product from a notification, show the product screen quickly and fetch any missing details asynchronously.

3. Hot start: bringing an existing activity to the foreground

A hot start occurs when the app process and the activity being resumed are still in memory. Android brings the existing activity back to the foreground.

This is generally the fastest launch scenario because Android does not need to create a new app process or recreate the activity.

Real-world scenario

You are browsing a product in your shopping app.

  1. You press the Home button.
  2. The app moves to the background.
  3. You open another app to check a message.
  4. You return to the shopping app using the recent apps screen.
  5. Android resumes the existing activity.

The product screen can appear almost immediately because its activity and UI state are still in memory.

Simplified lifecycle example

When an existing activity returns from the background, the common lifecycle callbacks are:

onRestart() ↓ onStart() ↓ onResume() 

The exact callbacks depend on the activity's previous state and how it was stopped.

class MainActivity : ComponentActivity() { override fun onResume() { super.onResume() // Refresh only what genuinely needs refreshing. // Avoid blocking the main thread here. } } 

A common mistake

Developers sometimes trigger every API request inside onResume():

override fun onResume() { super.onResume() // Avoid blindly reloading everything on every resume. // loadHomeFeed() // loadProfile() // loadCart() // loadRecommendations() } 

This can make a hot start feel slow even though the activity was already in memory.

Instead, refresh data based on its freshness, user actions, or relevant lifecycle events.

How to improve hot start

  • Avoid unnecessary work in onResume().
  • Keep the existing UI state when appropriate.
  • Refresh stale data asynchronously.
  • Avoid rebuilding the entire screen without a reason.
  • Do not assume that the process or activity will always survive in the background.

Practical example: Return the user to the same product screen immediately. Refresh its price or stock status in the background if the cached information is stale.

4. Cold vs warm vs hot start: quick comparison

Area Cold start Warm start Hot start
App process Not running Already running Already running
Activity Must be created Must be created or recreated Existing activity resumed
Process creation Yes No No
UI creation Required Required Usually not required from scratch
Typical speed Slowest In between Fastest
Example Open after process was killed Launch a new activity in an existing process Return to an existing activity from Recents

Important: These are launch scenarios, not guaranteed timing categories. Actual startup time depends on device performance, app complexity, system load, and the work your app performs.

5. How can you test these scenarios?

You do not need to guess whether your app is launching cold or returning from the background. You can test the scenarios deliberately.

Test a cold start

Force-stop the app, then launch it:

adb shell am force-stop com.example.shopping adb shell monkey -p com.example.shopping 1 

A force-stop terminates the app process and puts the package into a stopped state. This is useful for a controlled cold-start test.

Test a hot start

  1. Launch your app.
  2. Press Home.
  3. Open another app.
  4. Return to your app from Recents.

If the original activity is still alive, this is a hot-start scenario.

Test a warm start

  1. Launch your app.
  2. Keep its process alive.
  3. Finish the launch activity or navigate to a new activity entry point.
  4. Launch that activity again.

For example, you can use a notification or deep link to start a new activity while the process remains alive.

Be careful: Android may kill background processes under memory pressure, so verify the process state when running controlled tests.

6. Measure startup performance instead of guessing

Android provides tools to measure application startup.

A. Logcat

You can inspect startup-related timing information using:

adb logcat -s ActivityTaskManager 

Look for activity launch timing information in the output.

B. adb ActivityManager

For a quick command-line measurement:

adb shell am start -W com.example.shopping/.MainActivity 

The output can include:

  • ThisTime
  • TotalTime
  • WaitTime

These are useful for basic investigation, but they are not a replacement for repeatable performance benchmarks.

C. Macrobenchmark

For more reliable startup benchmarking, use Jetpack Macrobenchmark.

It supports startup modes such as:

  • COLD
  • WARM
  • HOT

A simplified example:

@RunWith(AndroidJUnit4::class) class StartupBenchmark { @get:Rule val benchmarkRule = MacrobenchmarkRule() @Test fun startup() { benchmarkRule.measureRepeated( packageName = "com.example.shopping", metrics = listOf(StartupTimingMetric()), startupMode = StartupMode.COLD, iterations = 10 ) { pressHome() startActivityAndWait() } } } 

You can change the startup mode to WARM or HOT and compare results.

For meaningful results, use a benchmark build variant, a physical test device where possible, and multiple iterations. Avoid comparing numbers collected under very different device or system conditions.

7. Understand TTID and TTFD

Two useful startup metrics are:

TTID (Time to Initial Display): The time from launching the app until its first frame is displayed.

TTFD (Time to Full Display): The time from launching the app until the app reports that it has fully drawn the content needed for the user to interact with it.

For example, your shopping app may display its home screen quickly, but product recommendations may still be loading.

  • TTID tells you when the initial UI appears.
  • TTFD helps you understand when the app considers its initial content fully displayed.

You can report fully drawn state using:

reportFullyDrawn() 

Call this when your app has reached the point you define as fully drawn, not immediately after setContent() if important initial content is still loading.

8. Recommended optimization strategy

Do not optimize only for cold starts. A good Android application should provide a responsive experience across all three scenarios.

Scenario Main optimization goal
Cold start Reduce process and application initialization work
Warm start Make activity creation and state restoration efficient
Hot start Resume quickly without unnecessary refreshes

My recommended approach:

  1. Measure startup using Macrobenchmark.
  2. Identify the slowest initialization or rendering work.
  3. Remove unnecessary main-thread operations.
  4. Defer non-critical SDK and data initialization.
  5. Restore UI state correctly.
  6. Avoid unnecessary refreshes when returning from the background.
  7. Benchmark again and compare the results.

Conclusion

Cold, warm, and hot starts describe different ways Android brings an application to the foreground.

As Android developers, we should understand what happens behind the scenes instead of simply trying to make the splash screen disappear faster.

A great startup experience means:

  • The app launches quickly.
  • The first screen appears without unnecessary delays.
  • Users return to their previous context.
  • Background work does not block interaction.

Remember: A fast first frame is important, but a responsive and useful first experience is what makes an application feel truly fast.

Further reading

What about your Android app? Have you measured its cold, warm, and hot startup times? Share your experience in the comments.

About the Author

Padmakar Garg is an Android Developer with 8+ years of experience in Kotlin, Java, Jetpack Compose, Kotlin Multiplatform, scalable architecture, mobile security, and high-performance app development.