Re(2): [TxMt] command with osascript stalls
Allan Odgaard
throw-away-1 at macromates.com
Mon Mar 27 03:45:11 UTC 2006
On 26/3/2006, at 22:30, Quinn Comendant wrote:
>>> I wonder if a compiled applescript would be faster?
>> Maybe twice as fast. [...]
> I've tried saving the applescript as a compiled application, but the
> execution time is still about 2 seconds. However, I notice if I
> save the
> same script and execute it from the Script Menu in the menu bar (via
> AppleScript Utility) or directly on the command line (via
> osascript) the
> applescript window arrangement commands run almost instantly. Where's
> the bottleneck?
Maybe it’s the shell startup then. Try to type “date” in a new
document and press ctrl-R to see how long that takes.
The shell startup is described here [1]. It might be you have a lot
of stuff going on which is only necessary for an interactive shell
(for example Fink sets up a lot of completion configuration in /etc/
profile iirc).
You could skip it by changing the command e.g. to:
#!/bin/sh
osascript «script»
But you may still want to tune your shell startup, as it’s used for a
lot of functionality in TM.
[1] http://macromates.com/textmate/manual/shell_commands#search_path
More information about the textmate
mailing list