Re: idle waste
Re: idle waste
- Subject: Re: idle waste
- From: "Erik M. Buck" <email@hidden>
- Date: Thu, 28 Mar 2002 16:10:57 -0600
----- Original Message -----
From: "Paul Cezanne" <email@hidden>
To: <email@hidden>
Sent: Thursday, March 28, 2002 2:07 PM
Subject: idle waste
>
If I have a Cocoa application just sitting there doing nothing, how much
>
CPU time does it waste? A lot, some, not much, negligible?
Effectively none. Cocoa blocks on I/O. If there is no I/O, the process
does not get any CPU time. Timers are needed to provide I/O and convince
the kernel to schedule things like games.
>
>
I essentially need to write a UNIX daemon and would rather do it in
>
Cocoa since it has to have some minimal UI, but it will be running all
>
the time.
You are not talking about a daemon if it has a user interface. You are
talking about a background application. You might consider writing a proper
daemon and providing a separate program for administration.
>
>
I will have an NSTimer running to trigger the stuff I need to do.
Then it will use CPU when the timers go off.
>
>
Bonus question: Does the amount wasted change if I have a window with
>
controls in it open?
No. If there is no I/O there is no CPU used.
>
>
Thanks!
_______________________________________________
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.
References: | |
| >idle waste (From: Paul Cezanne <email@hidden>) |