I have now got a solution to this, although convoluted.
The problem seems to be a delay as filemaker calls the applescript (possibly sandboxing?).
By getting filemaker to write the applescript to a text file on the desktop, and then running that applescript via a shell script command to run the applescript, it can now process the whole batch in under 4 minutes.