Apple events will be slightly faster, and avoid some of the things  
already mentioned. But realistically a single script vs a single  
apple event will have no noticeable difference in speed at all.

The saying goes that nothing takes any time at all unless you do it  
more than once ;)

So if you're looping and gathering hundreds of bits of info then the  
slight overhead of a script vs an event will add up. If you're only  
doing 1 or 2 things before returning then the benefit will be  
virtually nil. So all other things being equal, and none of the  
already mentioned things cause problems, then there is only a benefit  
if you're looping through a lot of them.

-James


On May 12, 2007, at 11:42 AM, Arnaud Nicolet wrote:

> Hi,
>
> I've the habit to use AppleEvents rather than AppleScript because I
> think AppleEvents are faster.
>
> However, sometimes, I can only do things with AppleScript but not
> with AppleEvents (the result is a too complex AppleEvent that doesn't
> even work).
> Are AppleEvents actually faster? If not, I will only use AppleScript
> scripts.
>
> I imagine that, when RB executes a script, the AppleScript engine
> needs to be loaded (maybe once per app?) and then the script is
> interpreted, so that slows down the execution of a script vs
> AppleEvents.
>
> Is it the right track?
> _______________________________________________
> Unsubscribe or switch delivery mode:
> <http://www.realsoftware.com/support/listmanager/>
>
> Search the archives:
> <http://support.realsoftware.com/listarchives/lists.html>

_______________________________________________
Unsubscribe or switch delivery mode:
<http://www.realsoftware.com/support/listmanager/>

Search the archives:
<http://support.realsoftware.com/listarchives/lists.html>

Reply via email to