Join CTO Moataz Soliman as he explores the potential impact poor performance can have on your bottom line. 👉 Register Today

ebook icon

App Performance

General

What is a Cold Start? Mobile App Launches Explained

What is a Cold Start? Mobile App Launches Explained

Your app startup time is a major indicator of your app’s overall quality; when your app is slow to launch, the user may expect the app to be slow or buggy as well. Conversely, a quick launch gives the impression that the rest of the experience will be smooth as well. So what is a cold start? And how long should your app startup take? We’ll explore these questions in this post.

What is a Cold Start?

Your cold app launch latency is the time between when your user launches the app from scratch and when it is responsive and accepting touch events. This is measured automatically when you are using Instabug App Performance Monitoring.

Since there are cold starts, you might infer that there are also warm starts and hot starts. These are the three types of app launches. Each refers to the state of the app in the user’s memory. For a more detailed breakdown, check out the article Understanding Cold, Hot, and Warm App Launch Time. Here’s a brief summary.

  • A cold start happens when the user launches the app either for the first time since booting or after killing the application. All of the app processes are created from scratch. This type of launch is the slowest because the system has a lot of expensive work to do.
  • In a hot start, your app’s process is already running in the background and the system brings it to the foreground. The application and activity are kept in memory. Only the view must be rendered. This is the fastest launch time because it is simpler and less intensive than a cold launch.
  • During a warm start, your app performs some of the cold start tasks even if the process is already running in the background. For example, this could happen when a user backs out of your app but launches it again.

App Launch Benchmarks

The Android Developer Guide currently considers the following startup times to be maximums for acceptable performance:

  • Cold launches should take less than 5 seconds
  • Hot launches should take less than 1.5 seconds
  • Warm launches should take less than 2 seconds

On the other hand, 49% of users expect apps to start in 2 seconds or less, so you should ideally be targeting a cold app launch time of 1.5-2 seconds.

Cold App Launch Stages

A cold app launch is a multi-stage process that includes several phases. If your App Performance Monitoring tool gives you visibility of your separate app launch stages, that will make slow startups easier to debug.

The precise breakdown of the cold app launch into stages differs by OS, but here’s a general overview of what happens during a cold app launch: the operating system creates the app process, then the app object, and launches the main thread. Then your app creates the main activity, followed by view inflation, layout, and draw. If you’re using Instabug, your Android and iOS launches are broken down into discrete stages with performance trends for each. You’ll be able to zero in on the source of slow launches.

Different developers will have different definitions of how app launch should be calculated and which activities it should contain, so Instabug’s EndAppLaunch API allows you to custom configure the end of your app launch. This defines when a cold app launch has ended, or when the app is actually interactable. That way, your actual launch duration is correctly assessed for your app.

iOS cold app launch stages

Here is a breakdown of the stages monitored by Instabug during cold iOS app launches.

  • OS Operating system stage: It can generally take 100 or so milliseconds for the OS to do the system-side work in order to initialize the app.
  • didFinishLaunchingWithOptions App lifecycle event: This method is called when your app is done loading and ready to be used. didFinishLaunchingWithOptions finalizes your app’s initialization and makes final adjustments. Learn more in Apple's docs.
  • sceneWillEnterForeground App lifecycle event: This method will be called if the app is set up to use Scenes.
  • viewDidLoad View lifecycle event: Called when the ViewController is loaded into memory. This when your customized initializations for your view controller are performed. More info
  • viewWillAppear View lifecycle event: Called when the ViewController’s view is about to be added to the hierarchy. This happens before animations are configured. Learn more in Apple's docs.
  • viewDidAppear View lifecycle event: Notifies the ViewController that its view was added to a view hierarchy. Learn more in Apple's docs.
  • Content Loaded: When the EndAppLaunch API is used, this will be considered to be the end of your launch.

Android cold app launch stages

The following stages are monitored by Instabug during cold Android app launches.

Decreasing Your Cold Start Duration

Here are a few tips you can use to make your cold app launch faster. For a more comprehensive list, check out App Launch Optimization: How to Resolve Slow Startup Times.

  • Identify and monitor slow cold start stages with an APM tool
  • Reduce memory usage by caching resources and computations
  • Defer non-critical and expensive processes until after launch
  • Test obsessively and in diverse environments
Want to try our latest AI features?
Sign up to the closed beta now
Thank you! We'll contact you once a spot opens up.
Oops! Something went wrong while submitting the form.

Learn more:

Instabug empowers mobile teams to maintain industry-leading apps with mobile-focused, user-centric stability and performance monitoring.

Visit our sandbox or book a demo to see how Instabug can help your app

Seeing is Believing, Start Your 14-Day Free Trial

In less than a minute, integrate the Instabug SDK for iOS, Android, React Native, Xamarin, Cordova, Flutter, and Unity mobile apps