• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Longer and longer...
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Longer and longer...


  • Subject: Re: Longer and longer...
  • From: Nathan Greenstein <email@hidden>
  • Date: Mon, 6 Sep 2010 07:44:48 -0700

Just out of curiosity, open Activity monitor and go to View-> Update Frequency-> Very Often. At the bottom, go to the System Memory tab. Set the Show menu in the top right to All Processes. Click the Real Memory column so that it has a downward-facing triangle to its  right. Select the (Apple)Script Editor process.
Then, to the beginning of your script, add a two second delay or so, and then a beep. Then start your script. And to the end, add another beep.
delay 2
beep
...
beep
Click Run in Script Editor, then go to Activity Monitor. Once it beeps, keep an eye on the memory graph at the bottom, and Script Editor's placement in the list. If the green Free portion of the graph decreases and/or Script Editor moves up in the list as you run the script, your script is using more and more memory as you go.

If this is the case, we've found the what but not the why. I'm not sure how to get better performance out of AS Editor. One thing you could try is saving the script as its own app and trying then.

HTH,
--
Nathan Greenstein
email@hidden



On Mon, Sep 6, 2010 at 05:27, Gil Dawson <email@hidden> wrote:
I do indeed use lots of recursion.  I had thought that Script Editor would forget all about those recursive calls after the script exited, but I guess not.

Here's a recent sequence: 35 ms, 60 ms, 88 ms, 138 ms, 160 ms, 180 ms.

Oddly, Smile doesn't do this.  It stays around 30 ms.

--Gil


On Sep 5, 2010, at 10:42 PM, Ronald Hofmann wrote:

> Well, this is hard to say without seeing the script.
> But it sounds like you got some recursive calls of parts of the script which causes this behaviour.
>
> Ronald
> ---
>
>
> Am 06.09.2010 um 07:35 schrieb Gil Dawson:
>
>> I have a rather long script which I run in Script Editor over and over several times.  The central loop takes about 35ms the first time I run it, then 50ms the next time, then on and on... up to 400 ms after maybe a dozen runs, when I found out:
>>
>> Quitting and relaunching Script Editor resets the speed back to 35 ms.
>>
>> Does this seem odd?
>>
>> --Gil
>>
>>
>> _______________________________________________
>> Do not post admin requests to the list. They will be ignored.
>> AppleScript-Users mailing list      (email@hidden)
>> Help/Unsubscribe/Update your Subscription:
>> Archives: http://lists.apple.com/archives/applescript-users
>>
>> This email sent to email@hidden
>
>

 _______________________________________________
Do not post admin requests to the list. They will be ignored.
AppleScript-Users mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
Archives: http://lists.apple.com/archives/applescript-users

This email sent to email@hidden

 _______________________________________________
Do not post admin requests to the list. They will be ignored.
AppleScript-Users mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
Archives: http://lists.apple.com/archives/applescript-users

This email sent to email@hidden

References: 
 >Longer and longer... (From: Gil Dawson <email@hidden>)
 >Re: Longer and longer... (From: Gil Dawson <email@hidden>)

  • Prev by Date: Re: Longer and longer...
  • Next by Date: Re: Longer and longer...
  • Previous by thread: Re: Longer and longer...
  • Next by thread: Re: Longer and longer...
  • Index(es):
    • Date
    • Thread