Compilation and Execution Time
Execution Time
Located next to the Compile and Run buttons, this indicator displays the time taken for the script’s execution or compilation in milliseconds (ms).
| Operation | Displayed Time | Description |
| Compile | Compilation Time | The time taken to translate your code into machine language. This duration is not a significant indicator for the script’s Runtime performance. |
| Run | Execution Time (Runtime) | The time required to fully execute the Main() method within the script. |
Performance Behavior
- First Run: The first execution of the script (or the first call after the SCADA system starts) usually takes longer. This is because the code is being optimized, compiled, and loaded into memory.
- Subsequent Runs: The same script completes in a much shorter time in subsequent calls (whether via the manual Run button or automatically in Runtime) because the code is ready in system memory in its optimized (compiled) state.
Important: For critical automations requiring fast response times, you should base your analysis on the subsequent (short) execution times. Consistently high millisecond values may indicate a code structure that needs optimization.
