14. Image IO

The idea of latency is worth thinking about.

Kevin Patterson

In Chapter 13, “Efficient Drawing,” we looked at performance issues relating to Core Graphics drawing and how to fix them. Closely related to drawing performance is image performance. In this chapter, we investigate how to optimize the loading and display of images from the flash drive or over a network connection.

Loading and Latency

The time taken to actually draw an image is not usually the limiting factor when it comes to performance. Images consume a lot of memory, and it may be impractical to keep all the images that your app needs to display loaded in memory at once, meaning that you will need to periodically load and unload images while the app is running.

The ...

Get iOS Core Animation: Advanced Techniques now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.