Re: AppleScript runs slow on Intel Macs
Re: AppleScript runs slow on Intel Macs
- Subject: Re: AppleScript runs slow on Intel Macs
- From: Christopher Nebel <email@hidden>
- Date: Thu, 21 Sep 2006 18:03:21 -0700
On Sep 21, 2006, at 4:01 PM, Michelle Steiner wrote:
On Sep 21, 2006, at 11:50 AM, Christopher Nebel wrote:
A suggestion on my local Mac forum is that the Intel Mac's require
AppleScript files to be saved as bundles, else they will be run as
PPC files by Rosetta.
Can anyone confirm or contradict that?
That's true if and only if you're referring to scripts saved as
applications. The script itself does not contain any PPC or x86
code -- it's data that's fed to the AppleScript interpreter. What
matters is the flavor of the executable running the script.
Are you saying that if you save a script as an application, without
saving it as an application bundle, it will require Rosetta to run?
Even if you're saving it on an Intel Mac?
That's correct.
But why does this script take anywhere from 18 to 25 seconds on a
1.83 GHz Intel iMac?
tell application "Finder"
repeat 1500 times
get current date
end repeat
beep
end tell
Yet this one is almost instantaneous
set x to 0
tell application "Finder"
repeat 1500 times
set x to x + 1
end repeat
beep
end tell
Because the first one sends 1500 events to the Finder (which may be
busy doing other things, hence the variance), and the second one
doesn't. Math operators are executed entirely in-process, regardless
of any "tell" block. Try watching the event log.
--Chris Nebel
AppleScript Engineering
_______________________________________________
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