Chapter 11. Making your app start fast
This chapter covers
- Optimizing app startup time
- Distributing content with the app
- Downloading formatted content
- Caching remote resources
The last chapter showed that having an app that’s fast helps with the perception of its responsiveness. In this chapter, I’ll help you think about how the startup speed of an app also helps with responsiveness. We’ll look at what an app can and should do when it’s started, and then move on to see how preloading and preformatting content can improve startup performance. Finally, we’ll look at how to use caching to save time when launching the app and when asking for the same resource multiple times.
In this chapter, I also introduce you to Melissa, who leads a team building an app for a popular social network. I’ll show you how she addressed these problems that are related to responsiveness:
- The app being slow to start
- Displaying content when used for the first time, even when the app is offline
- The time taken to download and format large amounts of content
- Removing items from the cache when they’re still needed
- Not deleting cached items and taking up unnecessary disk space
People will notice the impact of what you do to improve performance when they launch the app. The speed at which an app starts is one of the first impressions it makes. Doing a little is faster than doing a lot, so let’s begin by looking at what happens when an app starts.