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: Shawn Erickson <email@hidden>
- Date: Wed, 21 Jul 2004 20:12:57 -0700
On Jul 21, 2004, at 6:18 PM, Chaz McGarvey wrote:
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.
No problem lucky guess on my part...
FYI, I "figured" it out because I noticed in the sample that time was
being spent in the UI heart beat thread that AppKit creates when it has
a AppKit UI element to animate (progress bars, spinners, default
buttons, etc.). In the sample trace the UI heart beat thread appeared
to be dealing with a button... so I guessed pulsating default button.
Now Tiger... *smacked with NDA*
-Shawn
_______________________________________________
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.