I posted the script in the thread Hiroto referenced. Because of your response, I went back and had another look at Hiroto's "fix," with these results:
Without Hiroto's "fix" the script editor version of the repeat sequence runs in ~ 164 ticks, whereas the applet version takes ~544 ticks.
With Hiroto's "fix" the corresponding numbers are ~165 and ~165 ticks (the fix obviously is 100% in this case).
The "fix" I applied was exactly this:
*Added at beginning of script:*
script TestRunTime
*Added at end of script:*
return me
end script
set TestRunTime to run script TestRunTime
There appear to be two differences in your case:
1) Your script
2) Your OS
neither of which I have -- so I can't play with those.
However,
you could try my script, with and without the "fix," and see how it fares with Leopard.
For clarity, I've posted the script here. However, note these things:
1) I've removed my timing mechanism, which was based on the scripting addition "the ticks" from Jon's Commands (this won't work on an Intel MAC). But, at its fastest, the script takes about 3 seconds to run, and, at its slowest about 9 seconds -- so you should be able to gauge these differences with a watch or the system clock.
2) The script needs a picture file. I've deleted the one I used. You need to insert the path to a .jpg file (for example) that's on your computer. The place you need to do this is clearly indicated in the script I've posted.
--BEGIN SCRIPT
--(uncomment the following line, and 3 lines at the end of the script, to implement Hiroto's "fix")
--script TestRunTime
tell application "Finder" to set PictPath to "*INSERT PATH TO YOUR .jpg FILE HERE*"
tell application "Preview"
activate
open PictPath
tell application "System Events"
repeat 20 times
tell process "Preview"
tell menu bar 1
tell menu bar item "Tools"
tell menu "Tools"
click menu item "Flip Horizontal"
end tell
end tell
end tell
end tell
delay 0.1
end repeat
end tell
close window 1 saving no
end tell
--(uncomment the next 3 lines, and 1 line at the beginning of the script, to implement the fix)
--return me
--end script
--set TestRunTime to run script TestRunTime
--END SCRIPT
If you don't see a roughly 3x speed improvement in the applet with the "fix," that would suggest that Leopard and Tiger respond to the fix differently.
If you do see a roughly 3x improvement with the above script, that would suggest that your benchmark script doesn't respond to the fix similarly. Would it be possible to post that script?
(Of course, I'm assuming that the above script will basically run on your setup.)
I'm really interested in your results.