Camunda parallel gateway to split and execute tasks parallely

Problem statement -
We have a groovy script task in our camunda BPM which has around 650 lines of code. The task is taking around 5 sec to compile for the first time.

The requirement is -
To reduce the compilation time of the script

The query is -
If we split the groovy script code to 3 separate scripts of 200 lines of code each, and then execute it using a parallel gateway, can we expect the 3 tasks compile parallely with a lesser time period of ~2 sec.?

Hi @prashanth_nayak

Generally speaking it’s not a good idea to embed scripts that large in the engine, you should consider externalizing the code into a task worker. Then it would run in a different thread pool and so you could run everything in parallel.