AppleScript Performance Test: Difference between revisions
Jump to navigation
Jump to search
Line 71: | Line 71: | ||
<references/> | <references/> | ||
[[ | [[Category:AppleScript]] |
Revision as of 21:56, 13 November 2010
Timo and Rahul told me that they experience slight differences in execution speed of AppleScripts depending on how they have been saved. Now, some tests:
Testing equipment
- Machine: Heiko's MacBook Pro 15" 2.2GHz, 4GB, MacOS X 10.5.8
- Script:
set vorher to current date set t to 231 tell application "Finder" activate repeat t times set n to make new Finder window tell n to close end repeat set nachher to current date set dauer to nachher - vorher log dauer display dialog "Dauer: " & dauer & " Sekunden." buttons {"Doh!"} end tell
Testergebnisse
Kind | Saving-Options-Screenshot | Execution time (seconds) |
---|---|---|
Script im Script Editor | 31 | |
Script, Run Only | 16, gestartet via FastScripts[1] | |
Application, Run Only | 89 | |
Application | 88 | |
Script bundle | 18, gestartet via FastScripts | |
Script bundle, Run Only | 19, gestartet via FastScripts | |
Application bundle | 86 | |
Application bundle, Run Only | 86 | |
Text | 19, gestartet via osascript |
Bottom line
Applications are damn slow, every other variant is equally fast.
- Stuff
- Scripts and apps: Media:ASPerfScripts.zip
- Footnotes:
- ↑ because double-click only...