Re: Embedded Script Objects
Re: Embedded Script Objects
- Subject: Re: Embedded Script Objects
- From: Adam Bell <email@hidden>
- Date: Mon, 22 May 2006 10:19:02 -0300
Title: Re: Embedded Script Objects
At 6:30 AM -0400 5/22/06, email@hidden wrote:
adam bell
wrote
>I have seen it stated several times in several
places that the
manipulation of large lists is faster if the lists are properties
of
embedded script objects within the script than if they are simply
part of the script.<
I don't know about embedded script objects but I do
know that referencing the list with 'my' speeds up the process (thank
you Matt Neuburg). Try this:
set big_list to {}
repeat with idx from 1 to 5000
copy idx to end of
big_list
end repeat
On my system it takes about 41/2 seconds to run.
Now try this:
set big_list to {}
repeat with idx from 1 to 5000
copy idx to end of my
big_list
end repeat
This takes .05 seconds to run.
Don Rossi
Donnelley
Premedia
Nigel Garvey pointed this out to me as well (in another venue) -
the key is not that the big_list is in a script object but rather
that it is referred to by reference in any of several ways,
"my" being the simplest.
Adam
_______________________________________________
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