Re: Compiled script and high CPU %
Re: Compiled script and high CPU %
- Subject: Re: Compiled script and high CPU %
- From: Michael Eldridge <email@hidden>
- Date: Tue, 10 May 2005 14:44:49 -0700
Thanks everyone for your help. Switching from using a 'delay' to an on idle handler has totally fixed the problem. Now when Broadcaster is recording and my script is in the background it takes 0% CPU! Kudos.
On Tuesday, May 10, 2005, at 12:43PM, Simon Forster <email@hidden> wrote:
>
>On 10 May 2005, at 19:36, Michael Eldridge wrote:
>
>> I have tried not calling the event loop I wrote and using a
>> straight delay statement of length recordDuration but that didn't
>> fix the probelm. What's a good way to handle idle time in a script?
>
>As someone else said, use an idle handler:
>
>on idle()
>do stuff
>return <seconds>
>end
>
>where <seconds> is the number of seconds before the idle handler is
>called again. The delay method has been reported to eat CPU cycles.
>
>
>Simon Forster
>_____________________________________________________
> LDML Ltd, 62 Pall Mall, London, SW1Y 5HZ, UK
> Tel: +44 (0)70 9230 5244 Fax: +44 (0)70 9230 5247
>_____________________________________________________
>
>
>
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Applescript-users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden