lowering CPU cycles?
ambassador at fourthworld.com
Wed Apr 7 18:05:23 EDT 2010
David Coker wrote:
> I'm doing some pretty intensive data processing while running in a
> repeat loop, which causes the CPU cycles to jump up to 100% for the
> duration of a fairly lengthy run period. Memory consumption seems to
> be fine and the app remains plenty responsive with a "wait with
> messages" inside the loop.
> My question is how can I go about making this app more CPU friendly
> (and hopefully without slowing things down terribly) ?
There's the rub: your cycles can either go to your app or something
else, but there's only so many cycles to go around.
To give more of your cycles to the rest of the system, change this:
wait 0 with messages
...to some other values like:
wait 20 with messages
This will introduce a pause in your processing, but will share the
cycles with other processes.
Rev training and consulting: http://www.fourthworld.com
Webzine for Rev developers: http://www.revjournal.com
revJournal blog: http://revjournal.com/blog.irv
More information about the Use-livecode