Re: Applescript 201 - speed
Re: Applescript 201 - speed
- Subject: Re: Applescript 201 - speed
- From: Tommy Bollman <email@hidden>
- Date: Mon, 24 May 2010 20:38:45 +0200
Den 24. mai 2010 kl. 19.18 skrev Mark J. Reed:
>
> Yvan's no doubt referring to the second edition. The first edition has some
> tips on pages 259-60. There's also a thread here:
> http://discussions.apple.com/thread.jspa?threadID=1877444
>
> But in any case, if you have a script that is slow to run, the first step is
> to profile it so you know what to spend time trying to speed up and what not
> to bother with (advice repeated in the above thread). The problem there is
> that it's tough to profile AS, especially given the lack of built-in support
> for high-resolution timestamps.
>
> On Mon, May 24, 2010 at 1:07 PM, Robert Poland <email@hidden> wrote:
>
>>
>> On May 24, 2010, at 10:56 AM, Yvan KOENIG wrote:
>>
>>
>> Le 24 mai 2010 à 18:08, Robert Poland a écrit :
>>
>>
>> On May 24, 2010, at 9:51 AM, Tommy Bollman wrote:
>>
>>
>> There are some tips in the book Applscript The Definitive Guide by Matt
>> Neuburg.
>>
>> The loops are what you want to optimize.
>>
>> What you really should get are some tools for timing milliseconds they are
>> out there with some googling.
>>
>> Best regards
>>
>> Tommy Bollman
>>
>>
>> I looked at Matt's book and all I could find was a short section on loops.
>>
>>
>> A really efficient tip is the one upon list access (page 382).
>>
>>
>> My book, copyright 2003, doesn't seem to have anything about list access
>> page 382.
>>
>> Yvan KOENIG (VALLAURIS, France) lundi 24 mai 2010 18:55:31
>>
>>
>> Robert Poland - Fort Collins, CO
>>
>>
>>
>>
>> _______________________________________________
>> 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
Remember that the boss have said that premature optimization is the root of all evil.
(Knuth)
Using premade algorithms were applicable, and looking up algorithms in text-books can be
a great timesavior, and they aren't that hard to translate to applescript.
And besides that there are whole libraries out there with good sorting algorithms for instance
NiteFlit script library http://geeksuit.com/software/87_0_1_0_M/
I think ScriptDebugger also might be an important step into writing faster code, because
it gives you so much more *control* on what is actually going on in your scripts.
Best regards
Tommy Bollman
--------------------------------------------------------------------------------------------------
You will be advanced socially,
without any special effort on your part.
_______________________________________________
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