Chapter 13. Performance Tuning and Optimization

WHAT'S IN THIS CHAPTER?

  • Improving your application's performance on iOS 4

  • Using the Instruments tool to improve performance

  • Identifying and correcting two memory leaks

One of the most important things to remember about applications running in iOS 4 on a device is that you do not have unlimited memory or swap files to simulate memory as you do on a desktop computer. If your application is not efficient and does not release memory, its performance will be sluggish and eventually terminated by iOS 4.

Although ostensibly your application may seem to be the only application occupying the device, many system processes are running in background — for example, the process to detect and handle a phone call.

As you tune the performance of your application, you should focus on the following three issues:

  • Speed of the application

  • Overall responsiveness

  • Battery life

Apple has provided developers with a vast array of tools that will help you tune your application. This chapter presents a brief example that demonstrates two approachs you can use to identify and improve your application's performance:

  • Xcode's Build

    Performance Tuning and Optimization
  • Xcode's Run

    Performance Tuning and Optimization

PROFILING

The process of profiling is to use the tools, such as Instruments or to choose Build

  • Trace document

  • Track view

  • Detail views, which ...

Get Professional iPhone® and iPad™ Application Development now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.