On Jan 31, 2008, at 5:18 PM, Eric Williams wrote:
> This will make the system more "cancel-able" at the expense of
> performance - it seems like it's a lot of work for the system to
> execute an AppleScript, and calling one repeatedly is much more
> costly than writing the loop itself in AppleScript.
I do recall this being the case long ago and I haven't experimented
lately. What do you suppose is the overhead for a script dragged into
an app vs doing the same thing with declares? I have some apps that
are attachable and very scriptable and host literally hundreds of
applescript and I can call through them all very quickly by running
the OSA routines through declares. But when you go to the RB
applescript object by just dragging one in it gets slow. I wonder if
they are creating a separate instance of the OSA connection for each
one and connecting/disconnecting or even reloading the source for each
one...
Yup, quick test seems to show that is what it is doing, so it's
basically reloading the script each time you run it which isn't
necessary if you dont need to have all your properties and variables
reset to their default settings... Indeed, you could setup the loop
and hit it from the outside and not have to do any resetting of data
just keep it all inside the script, but you can't do that with the RB
applescript feature. Perhaps some more features are necessary. To
start a "maintain context" checkbox to make it not reload itself each
time, and a "reloadScript" method or something to make it do so on
command? We haven't gotten any new applescript or appleevent features
in a very long time perhaps time to create some... and how about an
Appleevent.DoubleProperty while we're at it too...
Thanks,
James
James Sentman http://sentman.com
http://MacHomeAutomation.com
_______________________________________________
Unsubscribe or switch delivery mode:
<http://www.realsoftware.com/support/listmanager/>
Search the archives:
<http://support.realsoftware.com/listarchives/lists.html>
|