Doing more things faster is no substitute for doing the right things.
Stephen R. Covey
Chapter 14, “Image IO,” discussed how we can efficiently load and display images, with a view to avoiding performance glitches that might impact animation frame rate. In this final chapter, we study the performance of the layer tree itself and how to get the best out of it.
The layer backing image can be drawn on-the-fly using Core Graphics, or set directly using the
contents property by supplying an image loaded from a file, or drawn beforehand in an offscreen
CGContext. In the previous two chapters, we talked about optimizing both of these scenarios. But in addition to explicitly creating a backing image, you can ...