Optimizing Task Execution Speed

AutoMate provides two operating environments: a debugging environment for creating, debugging and perfecting tasks, and another to run the tasks in an optimized state.

Debugging and testing should be done with the AutoMate Task Builder, which provides a full featured integrated debugging environment for building solutions. The Task Administrator should be used to run debugged and operational tasks, either manually with the run button or by attaching an AutoMate Trigger to the Managed Task. Generally speaking, getting the most speed out of an AutoMate tasks is a matter of balancing runtime feedback with the need for speed.

Tips To Speed Task Execution Speed

Do not run production tasks in the AutoMate Task Builder
The AutoMate Task Service always runs tasks faster than the AutoMate Task Builder. The Task Builder is a full debugging environment and commits more time to gathering and processing debugging information while a task is running than is necessary in a production environment. Using the Task Administrator to run the task manually and/or setting the task on a trigger could improve task execution speed by over 35%.

Turn off the Running Task Indicator Window
The "Running Task Indicator Window" is the small dialog that appears in the bottom-right of the screen while an AutoMate Task is running. It provides information on the task's progress, such as current step number and completion state of the current step. AutoMate needs to periodically update this window, which can be expensive in terms of CPU time, especially if the machine has other windows open. By turning off the indicator, AutoMate is free to concentrate solely on executing the task and doesn't worry about updating a user interface. The Running Task Indicator Window can be turned off in the System Options of the Task Administrator. The number of currently running tasks can still be determined by hovering the mouse over the AutoMate tray icon, or by showing the Running Task Manager by pressing Ctrl+Ald+End (although this key combination is configurable). Turning off the Running Task Indicator Window could improve execution speed by over 50% in some cases.

Do not use "Log Extended Step Information" of a Managed Task unless necessary
The "Log Extended Step Information" option on the Logging tab of Managed Task Properties logs verbose information of each step as it executes. In fact, it logs the same information that would normally be sent to the Output Debug window of the Task Builder. As a result, time is taken away from the running task to log this information. This amount of time can be significant, depending on the number and nature of the steps in the task. The speed hit is even worse when using Database logging, since database calls, especially remote ones, are expensive. Therefore, only use this option for debugging purposes. When debugging is completed, turn the option off.

Group smaller string concatenations together when building very large strings
AutoMate performs better when concatenating two large strings together instead of concatenating numerous small strings to one large string. To take advantage of this, group the smaller concatenations together, then concatenate that string to the larger one. For example, assume a comma-delimited file is being create from an AutoMate Dataset. The following AML...

<AMVARIABLE NAME="BigString"></AMVARIABLE>
<AMVARIABLE NAME="SmallerString"></AMVARIABLE>
<AMLOOPDATASET DATASET="mydataset">
<AMSET VARIABLENAME="SmallerString">%mydataset.column1%,%mydataset.column2%,%mydataset.column3%
</AMSET>
<AMSET VARIABLENAME="BigString">%bigstring & smallerstring%</AMSET>
</AMLOOP>

...will typically execute faster than...

<AMVARIABLE NAME="BigString"></AMVARIABLE>
<AMLOOPDATASET DATASET="mydataset">
<AMSET VARIABLENAME="BigString">%BigString & mydataset.column1%,%mydataset.column2%,%mydataset.column3%
</AMSET>
</AMLOOP>

...depending on overall string size and the size of the "smaller" string concatenations.

More Information

Visit the AutoMate User Resource Center for more tips and tricks from the AutoMate Task Developer community.