Temporary Values

When writing Actions, calculations that are used more than once in an aggregate value or Loop are inefficient because they repeat the same calculation causing longer processing times.

Running the calculation once and storing the result as a Temporary Value allows it to be reused across all operations and predicates without needing a separate rule.

If each iteration of the Loop is performing non-trivial work on the current object such as buffering, then it is quicker to perform the buffering once, assign the result to a Temporary Value and then use the Temporary Value within the loop.

The For all loop displayed in the Action below will calculate the buffer of the current Centre-Line object for every iteration, even though the result will be identical each time.

An action determining if roads intercept footpaths and are drivable
Buffering occurs for every iteration of the Loop

The Action below will be faster, as the buffer is calculated only once, stored as a Temporary Value and then the Temporary Value is used within the Loop.

An action determining if roads intercept footpaths and are drivable
Buffering is calculated only once