Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to find the cause of a 100% CPU usage on an iPhone App

I've diagnosed a strange behavior in an app : after 10 minutes or so, the CPU usage goes to 100%. There's no leak in the app, and it happens while the app is doing nothing.

I can profile this with instruments using the "Time Profiler", but is there a way to find what the actual cause is ?

like image 760
Julien Avatar asked Sep 12 '11 13:09

Julien


People also ask

What causes high CPU usage iPhone?

Apps which are open in the background use large memory is a myth and quitting them is counterproductive. Location services to be allowed only while using the app. Set your iPhone to fetch email and calendar data from internet less frequently. Turning off Background App Refresh.

Why does my CPU show 100% usage?

If the CPU usage is around 100%, this means that your computer is trying to do more work than it has the capacity for. This is usually OK, but it means that programs may slow down a little. Computers tend to use close to 100% of the CPU when they are doing computationally-intensive things like running games.


1 Answers

When profiling with Instruments (Time Profiler), look to see what method is using the majority of CPU time. Trace the calls back to see why.

like image 90
Alastair Stuart Avatar answered Oct 06 '22 06:10

Alastair Stuart