O'Reilly logo

iOS Core Animation: Advanced Techniques by Nick Lockwood

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

12. Tuning for Speed

Code should run as fast as necessary, but no faster.

Richard E. Pattis

In Parts I and II, we learned about the awesome drawing and animation features that Core Animation has to offer. Core Animation is powerful and fast, but it’s also easy to use inefficiently if you’re not clear what’s going on behind the scenes. There is an art to getting the best performance out of it. In this chapter, we explore some of the reasons why your animations might run slowly and how you can diagnose and fix problems.

CPU Versus GPU

There are two types of processor involved in drawing and animation: The CPU (central processing unit) and GPU (graphics processing unit). On modern iOS devices, these are both programmable chips that can run (more ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required