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
 ____________________________________________________________________
 ambassa...@fourthworld.com                http://www.FourthWorld.com

_______________________________________________
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode

Reply via email to