I am currently trying to optimize my workflow a bit.
Right now I am using a Column Expressions Node to replace a cell value in a column “Volume” with a flow variable called volume (this flow variable changes inside a parameter optimization loop).
To define the cell that is being replaced in the current parameter optimization loop, I use the iteration of an outer loop I am doing (so the first outer loop switches the value in the first row, the second outer loop changes the Volume value in the second and so on).
This is the code I am using inside the Column Expression Node right now, the node is set up to replace the column Volume:
if (rowIndex()== variable("IterationOuterLoop"))
And this is the part of the current workflow, the values get changed in the Column Expression Node, I then calcuate a difference to target and that is being outputted to the parameter optimization loop end.
These are the three main components that run in the workflow, the rest are just single Nodes that do not impact performance.
Honestly I cannot tell you why it works so much quicker, these three components contained a single column expression each. Changing these three nodes to a rule engine gave me an 88% boost in execution time without changing anything else.
IT’s important to note that each of these column expressions / rule engines run in a nested loop, so they are executed a couple of hundred to thousand times everytime the workflow runs.