Outrageously slow AppleScript performance

Roger Eller roger.e.eller at sealedair.com
Thu Oct 2 10:42:26 EDT 2014


Unless the AS needs to be built dynamically, you could compile it, and just
launch it through LC.

~Roger

On Thu, Oct 2, 2014 at 10:24 AM, Richard Gaskin <ambassador at fourthworld.com>
wrote:

> Bill Vlahos wrote:
>
> > When I execute the AppleScript listed below in the AppleScript Editor
> > it works in about 1 second. Take the same script, put in in a
> > LiveCode field and do field “name” as AppleScript and it takes
> > between 1 and 2 minutes to do!
> >
> > 1. Why?
> > 2. How can I make it run quickly?
>
> The time difference is big enough that I suspect Zyrip is on the right
> track:
> <http://lists.runrev.com/pipermail/use-livecode/2014-October/206543.html>
>
> But in general, executing AppleScript from LiveCode will almost always be
> somewhat slower than running the same script within Apple's AppleScript
> Editor for two reasons:
>
> 1. In AS, the interface to the AE subsystem is initialized when the app
> opens, but in LC it needs to be setup at runtime when the call is made.
>
> 2. In AS scripts are compiled before being run, but in LC we're passing a
> string to the AS subsystem, which it then has to compile before executing.
>
> Neither of those should take quite that long, though.
>
> If you're coming to tonight's LiveCode User Group meeting in Pasadena
> please bring your project and let's brainstorm ways to diagnose what's
> going on with it.
>
> --
>  Richard Gaskin
>  Fourth World Systems
>  Software Design and Development for the Desktop, Mobile, and the Web
>  ____________________________________________________________________
>  Ambassador at FourthWorld.com                http://www.FourthWorld.com
>
> _______________________________________________
> use-livecode mailing list
> use-livecode at lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your
> subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode



More information about the use-livecode mailing list