Script Loading

All scripts contained in the script locations are automatically loaded by the DaVinci Configurator. If new scripts are added to script locations these scripts are automatically loaded.

If a script changes during runtime of the DaVinci Configurator the whole script is reloaded and then executable, without a restart of the tool or a reload of the project.

This enables script development during the runtime of the DaVinci Configurator

  • No project reload

  • No tool restart

  • Faster feedback loops

Note: The .jar artifact file from a script project *should be updated by the Gradle build system, not by hand. Because the Java VM is holding a lock to the file. If you try to replace the file in the explorer you will get an error message.

Internal Script Reload Behavior

Your script can be loaded and unloaded automatically multiple times during the execution of the DaVinci Configurator. More precise, when a script is currently not used and there are memory constraints your script will be automatically unloaded.

If the script will be executed again, it is automatically reloaded and then executed. So it is possible that the script initialization code is called multiple times in the DaVinci Configurator lifecycle. But this is no issue, because the script and the tasks shall not have any internal state during initialization.

Memory Leak Prevention

The feature above is implemented to prevent leaking memory from an automation script into the DaVinci Configurator memory. So when the memory run low, all unused scripts are unloaded, which will also free leaked memory of scripts.

But this does not mean that is impossible to construct memory leaks from an automation script. E.g. Open file handles without closing them will still cause a memory leak.