• 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: AppleScript runs slow on Intel Macs
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: AppleScript runs slow on Intel Macs


  • Subject: Re: AppleScript runs slow on Intel Macs
  • From: "hackmiester (Hunter Fuller)" <email@hidden>
  • Date: Thu, 21 Sep 2006 20:19:26 -0500


On 21 September 2006, at 20:03, Christopher Nebel wrote:

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.

In my experience, that isn't the case. I can confirm this because I have screwed up /usr on my box and repaired and hacked at it until I was blue in the face (or some other more appropriate cliché), but Rosetta still won't work. So I can tell if it needs rosetta or not, although I wish it wasn't like that... :-)

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 (Applescript- email@hidden)
Help/Unsubscribe/Update your Subscription:
@hackmiester.com


This email sent to email@hidden


-- hackmiester (Hunter Fuller)

<svinx> yknow when you go to a party, and everyones hooked up except one guy and one girl
<svinx> and so they look at each other like.. do we have to?
<svinx> intel & nvidia must be lookin at each other like that right now



Phone Voice: +1 251 589 6348 Fax: Call the voice number and ask.

Email
General chat: email@hidden
Large attachments: email@hidden
SPS-related stuff: email@hidden

IM
AIM: hackmiester1337
Skype: hackmiester31337
YIM: hackm1ester
Gtalk: hackmiester
MSN: email@hidden
Xfire: hackmiester


_______________________________________________ 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
References: 
 >Re: AppleScript runs slow on Intel Mac's (From: Leif Öquist <email@hidden>)
 >Re: AppleScript runs slow on Intel Macs (From: Christopher Nebel <email@hidden>)
 >Re: AppleScript runs slow on Intel Macs (From: Michelle Steiner <email@hidden>)
 >Re: AppleScript runs slow on Intel Macs (From: Christopher Nebel <email@hidden>)

  • Prev by Date: Re: AppleScript runs slow on Intel Macs
  • Next by Date: Re: AppleScript runs slow on Intel Macs
  • Previous by thread: Re: AppleScript runs slow on Intel Macs
  • Next by thread: Re: AppleScript runs slow on Intel Macs
  • Index(es):
    • Date
    • Thread