Use the JSL Debugger to discover where the script is expending the most time. See Debug or Profile Scripts.