Re: What's using the processor during idle-time?
Re: What's using the processor during idle-time?
- Subject: Re: What's using the processor during idle-time?
- From: Chaz McGarvey <email@hidden>
- Date: Wed, 21 Jul 2004 19:18:20 -0600
On Jul 21, 2004, at 6:21 PM, Shawn Erickson wrote:
On Jul 21, 2004, at 5:11 PM, Chaz McGarvey wrote:
Hello:
I have an app which has started using a lot more processor time while
idle. Normally it uses 0% of the processor (as displayed by top)
when the program is idle, but lately it shows up as 10-15%. But the
interesting thing is this increased use of the processor only occurs
when a certain window is key (and the program itself is front-most).
I can't think of what I could have done to cause this to happen
except that a little while ago I started using a subclass of
NSDocument instead of a subclass of NSWindowController to manage the
window that supposedly causes the increased processor use (because I
decided it would make sense for the window to have the benefits of
being a document).
I have done a sample on the program under the circumstances which
cause this increase processor usage, but unfortunately I can't really
tell what it means as far as what is causing this to happen. I've
included the last bit of the sample, but the full sample can be found
at http://www.brokenzipper.com/sample.txt .
Does said window have a default button pulsing in it?
Actually, it does. And it didn't before I started using NSDocument. I
just turned it off and you are correct, the app stays at 0% while idle.
I had no idea it took so much to do the pulsing button. Thanks for
figuring this out so quickly. I guess I won't worry about it then.
As a side note you may want to consider using in addition to sample
Thread Viewer.app or better yet Shark.app to understand what your
application is doing.
Ok, great! Thanks again.
Chaz McGarvey
http://www.brokenzipper.com
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.