views:

128

answers:

1

Is there a way to increase the application priority for the CPU on iPhone? I notice that SpringBoard takes up too much CPU at times causing some fluctuation in performance on the device.

+3  A: 

What you're seeing is probably an artifact related to Core Animation. The Core Animation server on the iPhone is owned by Springboard, so many Core-Animation-related actions (calculations related to animation, etc.) appear to be performed by Springboard even though they were initiated by your application. This is not a case of Springboard itself burning CPU time in the background, it's just how some of this processing looks when running Instruments or similar tools against the device.

In this case, I'd look at how you were animating things around the screen (even implicitly using the UIKit interface elements), or how those views or layers were being composited, in order to smooth out your performance issues.

Brad Larson
thanks.. will look there. :)I wonder then if I would get better performance by translating that UI animation into an OpenGL view. Hmmm...I wonder.
tbarbe
@tbarbe - I would first try to profile your application using Shark and Instruments to see if there were any obvious hotspots contributing to the performance degradation. Going to OpenGL ES will add a tremendous amount of code for even a simple animation, and you'll still need to perform that within a non-opaque CAEAGLLayer composited on top of your other UI elements.
Brad Larson
thx Brad... will look into it more - thanks for the advice! Im also looking for excuses to dive headfirst into OpenGL to see what the advantages and disadvantages really are. :)
tbarbe
@tbarbe - If you're heading that direction, I recommend this little open source project: http://www.sunsetlakesoftware.com/molecules . Also, the course notes for my iPhone development class have detailed sections on both Core Animation and OpenGL ES: http://www.sunsetlakesoftware.com/sites/default/files/AdvancediPhoneApps.zip (they're in VoodooPad format).
Brad Larson
You rock Brad. Thx. Btw your calculator is very nice stuff... fancy!
tbarbe