Inspecting Performance with Instruments
We’ve looked at a few places where you can make an app faster, but what about the rest of the time? How can you make a method return faster if you don’t know where it’s slow? You can guess, looking at the code with your brow furrowed until you decide to change something, but that’s problematic. Not only could you be ignoring non-obvious performance problems, but in your attempt to fix the issue, you could actually make it slower!
What you need is data, and that’s where Instruments, a performance-analysis and testing tool bundled with Xcode, comes in. Let’s try it out.
In Xcode, open TapALap and select Product → Profile or press ⌘I. This builds your app in its Release configuration, which performs additional ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access