Re: Generating applescript files
Re: Generating applescript files
- Subject: Re: Generating applescript files
- From: Christopher Nebel <email@hidden>
- Date: Thu, 16 May 2002 16:32:56 -0700
On Thursday, May 16, 2002, at 12:46 PM, has wrote:
Matthew Smith wrote:
If you are using Mac OS X you can use the shell command osacompile
within a
"do shell script" to turn it into a compiled script.
Is this faster than using 'run script'? Or does it have the same sort of
overheads?
I wouldn't mind knowing, because run script is a significant performance
sump in some of my stuff. If osacompile is faster I could support it as
an
optional alternative for those who have it [OS X users].
Well, there's the minor difference that osascript just compiles the
script, doesn't execute it, and saves it to a file; whereas "run script"
compiles and executes the script, so they're not really equivalent.
However, in general, calling "do shell script" is slower than doing the
work inside your own process. Launching a new process is very expensive
compared to an OSAX call, and the new process can't take advantage of
any cached information the originating process has.
--Chris Nebel
AppleScript Engineering
_______________________________________________
applescript-users mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/applescript-users
Do not post admin requests to the list. They will be ignored.