RE: Why are compiled scripts slower than from Script Editor?
RE: Why are compiled scripts slower than from Script Editor?
- Subject: RE: Why are compiled scripts slower than from Script Editor?
- From: "Patrick S. Page-McCaw" <email@hidden>
- Date: Sat, 1 Feb 2003 15:49:02 -0800
Seems my first post was garbled by the server. The +/- character was
replaced by the number 1. The correct times are:
554 msec +/- 53 msec run from a double-clickable application
(note that this is the repeat time, and it does not include the
substantial lag from the last click to the beginning of the run)
501 msec +/- 1.6msec [1] run from within SMILE, Script Editor gives
essentially
the same result.
If Doug or others would like to see the timings, I would be happy to
send them along. For those interested in using this technique to
control time-critical operations, you should be aware that there are
occasional long lags (as long as 500msec), presumably a result of
Finder, etc processes. This happens very rarely, perhaps less than
once in a hundred runs from within SMILE, but more often (apparently)
from a stand-alone.
To summarize, running a simple repeat script from a stand-alone
double clickable application is slower (each repeat takes longer) and
more variable (the duration of the repeat varies) compared to running
the identical script from within SMILE or Script Editor. Changing the
priority of the stand-alone from Normal to High using Peek-a-boo does
not change this result.
The question is why? It is very impressive that AppleScript can do
this at all, I just wish that I understood this behavior.
Thanks, a lowly biochemist and molecular biologist[2],
Patrick
[1] a physicist might be interested that the frequency histograms
resulting from the runs from the editors are not very normal, over
93% of the data is at the 501 msec time point, the rest is
distributed between 500 and 510 (4% of the data is at ~508msec) msec.
When the script is run from within SMILE or SE, the resulting
frequency histograms are more normal, with a few outliers. 92% of the
data lies from 530 to 560 msec. Removing the outliers (867 and 975
msec) gives a st dev of 7.8 (but those outliers are really bad). The
above results are consistent across multiple runs with different
scripts, though the numbers vary some the shape of the frequency
histograms is remarkably constant. My use of the st dev (for the +/-)
above is not well justified, but it gives a rough idea of the
problem, and I didnt think I would be facing peer review ; ).
[2] as a general rule molecular biologists don't do math more
complicated than multiplying by 10 and dividing by 2, but my math is
not all that rusty (yet).
--
___________________________________________________________________________
Patrick S. Page-McCaw
University of California, San Francisco
Department of Physiology, Box 0444
513 Parnassus Avenue, Room S-864
San Francisco, California 94143-0444
phone: 415 476-8367
fax: 415 476-4929 attn P. Page-McCaw
email: email@hidden
_______________________________________________
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.