Your app launch represents a critical moment for your users: it’s their first interaction with your app. And first impressions can mean a lot in the mobile market—launches give the user an indication of your app's overall quality.
Why is app launch optimization necessary? Slow launches impact user device memory and battery life, your users' perception of your app and brand, and your business metrics. Wasted time on behalf of your users translates into wasted business for your app and slow starts can also mean poor app store ratings or users uninstalling your app altogether. Achieving a short gap between launch and interactivity is now more important than ever before.
There are a lot of components involved in an app launch, but that doesn’t mean that reducing launch times has to be complicated. This app launch optimization guide will cover the variables that impact startup times and will help you set and reach performance goals.
- Launch types and benchmarks
- App launch optimization guide
There are three basic types of app launches: cold, warm, and hot. Each refers to the state of the app in the user’s memory. For a detailed breakdown, check out the article Understanding Cold, Hot, and Warm App Launch Time (not to be confused with cold, hot, and warm lunchtimes).
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
Based on an analysis of the top 100 apps, 39 apps cold launch in under or around 2 seconds, and 73 in under 3 seconds. According to another study, 49% of users expect apps to start in 2 seconds or less. Ideally, you should be targeting a cold app launch time of 1.5-2 seconds.
Keep in mind that app launches involve numerous steps and parts. You probably won't find one major fix for your code that instantly delivers huge results. But these tips will help you find the individual places where you can make small improvements and stack them up.
Reduce unused assets: To start, take an assessment of what you have running at launch. Is your code up to date and is it all necessary for launch? Eliminate hidden costs by removing unused frameworks. Outdated and extraneous code adds to your app launch duration.
Defer expensive work until after the first frame is rendered: If there are any processes that are not needed for the app to launch, when possible, delay heavy tasks. Load only the data necessary for rendering the first frame, and delay the rest until after launch. Refreshing data, for instance, may be possible to defer until after the app has launched.
Use placeholder content for items not critical for launch: Retrieve only the data necessary to display the app’s initial view. Consider displaying placeholder content that isn’t filled in until after the app has finished launching.
Prioritize work and reduce heavy activity initialization: Activity creation can be a lot of work and sometimes creates bottlenecks. Avoid delays and network congestion by moving blocking work off the main thread and sending unnecessary work to background threads to be performed asynchronously.
Identify slow startup stages: Use an APM tool to identify which app launch stages are taking the most time. Then you can make targeted improvements that tackle the root issues. Tracking performance over time will let you see immediately when specific updates are causing startup slowdowns.
Measure your launches accurately: 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.
Reduce your memory usage: Allocating and manipulating memory can take time. You can reduce your memory usage by caching resources and computations when possible. Optimizing your memory and CPU usage will shorten loading times.
Load dependencies as static libraries: Identify specific processes or tools that can be simplified. When your app has a lot of dependencies added as dynamic libraries, your launch time will increase. Whenever possible, change frameworks to static libraries. Dynamic libraries are loaded at runtime, while static libraries are loaded at compile time. What is a library?
Reduce dependencies on external frameworks and dynamic libraries: External libraries and frameworks come with a cost. Each third-party framework added to your app contributes to its launch time. It’s not just about size—poorly optimized or buggy SDKs can block critical processes and drag wait times. To lower external code’s impact on launch, remove non-essential items or move them to background threads. If you’re using only a small part of a third-party framework, consider removing it altogether and replacing it with in-house assets to perform the desired function.
Optimize first screens: Most developers will work tirelessly to optimize the loading of the app’s home screen upon launch; however, your app home screen isn't always the first the user sees. For example, if a social media user receives a push notification about a new friend request and opens the app from the notification, the app will load the friend request screen upon launch. For high performance on all launches, you’ll need to optimize your home screen and first screens. You can monitor first screen performance with Instabug App Performance Monitoring.
Use splash screens: Loading screens won't actually reduce your app launch time, but they will make it feel faster to the user. They also set the tone for the app, brand, and overall experience. In addition, if your app takes a long time to launch, a splash screen lets the user know it hasn't frozen.
Use Apdex scoring for your launches: Launch times aren’t the only benchmarks you can use for app launch performance. Instabug Application Performance Monitoring calculates your Apdex scores for app launches. Apdex gives you a quick understanding of your user experience in a single metric. You can track your Apdex changes over time and spot regressions or improvements easily.
Test obsessively: Your app launch time will vary across devices and operating systems. It's necessary to test in diverse environments. Monitoring your app launches under different conditions will expose potential device and OS-specific issues.
Monitor and set alerts: It’s critical to continuously keep monitoring for changes—small regressions are easily introduced and add up quickly. They can be difficult to notice if you are not using an APM tool to track your performance. Your APM tool should alert you immediately when quality metrics fail your thresholds, so you can identify, diagnose, and fix issues before they impact more users. You can create alerts for your app performance using Instabug App Performance Monitoring.
Here it is again, but with fewer words this time:
- Reduce, simplify, or defer work
- Fetch only what you need for the app to launch
- Move dependencies to background threads
- Test obsessively
- Leverage APM to monitor your app launch and its processes
- What is Application Performance Monitoring?
- Mobile App Performance Metrics and KPIs
- Mobile App Quality: An Essential Guide
Instabug’s triple threat of APM, Crash Reporting, and Bug Reporting tools will empower you to optimize your app’s performance and deliver the high-quality experience your users expect and deserve.
Find out how you can optimize your app performance with Instabug