Am 06.01.2007 um 20:37 schrieb Jonathan Johnson:
On Jan 6, 2007, at 1:26 PM, Stefan wrote:
We probably discussed this issue in the past, but..
More or less idle RB apps get roughly 30-60% of CPU time
(according to OS X'
activity monitor), Cocoa apps's don't.
Thus, I wonder is RB apps do busy waiting for the next event to
appear. And for
Mach-O build, additionally, I wonder why they don't go fully idle
until the next appears
appears.
We only poll certain things, the most prevalent being sockets. If
you have a listening or connected socket, we will poll them roughly
every 5 ticks.
However, I've never seen a truly idle app use more than 1.5-3.0%.
OK. That fine - and far less 30%.
BTW: Activity monitor show high CPU usage, while the accumulated CPU
time
doesn't go up fast.
To test this, build an empty project, and launch it from the
finder. Look at the processor usage. For me, it's 0%.
So the question is, what does your app have that the default app
doesn't? Do you have threads that are running in the background? Do
you have lots of socket communications? Timers?
I need to check the exact situation.
But let's rephrase my question:
Suppose I have a worker thread, which need to perform a certain job n
seconds (n > 5) after
the end of the current job. If I don't want to use a timer to kick of
the next run,
I would ordinarily Suspend() the Thread. Would this make the app go
idle? Or is RB still
busy idling each few millis to see, if the Thread has Resume()d?
What's the best practice, to really release the CPU for a known time
of n idle seconds?
Constant redraws?
No, redraws are performed on demand.
_______________________________________________
Unsubscribe or switch delivery mode:
<http://www.realsoftware.com/support/listmanager/>
Search the archives of this list here:
<http://support.realsoftware.com/listarchives/lists.html>