Chapter 12. Making your app run fast
This chapter covers
- Preloading data
- Treating multiple operations as one
- Performing multiple operations simultaneously
In the last chapter, I showed you actions you can take before and during app startup to improve its responsiveness. In this chapter, I’ll continue this theme and look at ways to improve the speed and responsiveness of an app while in use. Specifically, I’ll cover three techniques:
- Eager loading— Lets people avoid having to wait for data to be retrieved.
- Combining requests and responses— Fewer requests take less time.
- Making asynchronous requests— Reduces the time spent waiting.
In this chapter, I’ll also introduce you to Elliott. He has a shopping app where the primary use case involves finding items through a search function. I’ll show you how he used each of the three techniques to address the following challenges: