How to find which method makes my iPhone app slow ?
- by Stewart Hou
Currently I am working on a production app. One function acts like the settings.app on iPhone. When the user click a cell of a tableView, as shown below
http://www.penguintech.net/images/stackoverflow/1.png
It will push another view, which includes a textfield to let user input something.
However, on both simulator and device, after the app just loaded, the delay between clicking and showing the second view takes around 2 seconds. Then if user get back to previous view and click again, it will be no delay at all.
To detect which method makes the delay, I put a NSLog() in every involved methods, but when I was inspecting the console while running the app, all NSLog() message showed in 0.1 seconds, and then still a delay on the app.
Is there any other way to trace the performance footage of a app? The Instruments shows only CPU usage in Mac OS not in iPhone.