Application CPU percentage...
Bill Bumgarner
bbum at mac.com
Tue May 29 17:56:36 PDT 2007
On May 29, 2007, at 5:35 PM, Charles E. Heizer1 wrote:
> OK, so I assigned the Key Equiv. \R Return to my button and now my
> app seems
> to use anywhere from 8 to 10 percent CPU. This seems a bit high. Is
> there
> something I can do?
Without seeing the code and understanding the problem at hand, not
much the list can do to help you here other than suggest you use the
performance tools included with the developer tools to go figure out
where your CPU cycles are going.
Now -- if you are watching the output of top or Activity Monitor, keep
in mind that hitting a button is going to use a LOT of CPU for a very
short amount of time as the button tracks the event and, thus, all the
different states have to be drawn. This will be on top of whatever
CPU is being consumed by your app in response to the button hit.
However, it is likely using 8% or 10% for a very short amount of time
-- much less time than the sampling granularity of AM or top and,
thus, it shows as 8% or 10% for longer than it really is.
In any case, that much CPU for a button hit -- for actively responding
to a user action -- isn't a problem unless it is sustained.
b.bum
More information about the MacOSX-dev
mailing list