FastScripts 3.0.3 is now available on the FastScripts home page, or by selecting “Check for Update” from the FastScripts menu.
This update changes FastScripts’s script execution to be a bit more consistent with the way Apple’s own Script Editor, and Late Night Software’s popular Script Debugger, run scripts. Specifically, scripts are now run on a separate thread from the main thread of the script running application.
One of the major changes in FastScripts 3.0 was to move execution of scripts from the FastScripts app itself into separate script runner processes. Because the script processes were unique for each script, I assumed there would be no advantage to putting scripts on their own thread within that application. However, some subtle performance issues turn out to be possible when the script is running on the main thread.
Because Script Editor and Script Debugger both run their scripts on separate threads, I think that most script authors are probably well-accustomed to the implications. Because most of the behavior of scripts is the result of sending events to other apps, there aren’t too many risks to running in a separate thread. The main thing to be aware of is if a script uses Cocoa frameworks directly, it needs to take care to run custom UI on the main thread.
The update also includes some other performance and usability improvements:
- Changes to script execution to make behavior more consistent with Script Editor’s behavior
- Improvements to event handling performance in Cocoa UI presented by scripts
- Fixes for bugs that prevented some changes to script folders from being reflected in the menu
- Asking for the “count” of args in script’s run handler now works without error
- Fix a bug that prevented the “Create Scripts Folder” items from working in some cases