applescript cpu usage is too low

I’m applescripting quicktime 7 (the codecs in my video files seems to require quicktime 7). When I do the export manually qt7 runs at almost 100% cpu and the export is fairly quick, when I applescript the export qt7 uses about 25% cpu and the export is of course about four times slower. Do you have any idea what this is about, and how I can get qt7 to use the regular amount of cpu? Maybe this is not even an applescript issue?

Hello.

I’d try convert your applescripts into osascripts, and try renicing the processes the shell scripts creats. You can of course also execute several, say four shell scripts with different parameters at a time, to regain the time lost. Please have a look at man renice. You’ll have to sudo renice since you are raising the priority.

Edit

I’d start exprimenting by creating an application based on your script first, or moving your application into a script, if this is the opposite of your situation.

I’d also try to run a script from Satimage’s Smile, if AppleScript Editor is your standard editor, and from the script menu if that is not what you have used.

In short, I’d try everything, before I convert a script to osa-script and renicing, since all the other options are much faster to implement, and experiment with.

I’d also try to run the script from different stuff like quick silver, in the hope that it helps, as such utilities uses their own script runner.

It would help to post the code. Are you doing any loops or other things after the Export command is given? Is the script waiting for any return value?