Large For Each Loop gradually slows down

Hi Everyone,

A question: I am currently running a three stage process in workfusion to reconcile reports. Basically it can be broken down into 3 steps:

  1. \Extract information from 2 excel reports
  2. run a for each loop that executes a bunch of rules to modify the reports into usable data
  3. read the report into a separate excel file.

Currently the solution works 100% but what I have realized is as soon as the for each loop on step 2 runs past more or less 260 rows in excel all of the sudden instead of taking 0.3 seconds to go through a loop all of a sudden it takes 10 seconds, and it just deteriorates from there. Is this a memory issue?

Hi @shuan.vanhuyssteen it might be. Can you send us your recording (with test data) so we could test it and reproduce the issue?

You can send the recording via a direct message.


my apologies for the late reply! things have been pretty crazy this i side. I will be sure to package it and send it. I found that the problem does not apply when published to tower only on workfusion studio. Another issue I have found is that if the loop is too large sometimes the loop just randomly resets itself and it just runs over and over again without moving further into the process.

1 Like

Thank you @shuan.vanhuyssteen we’ll look forward for the recording.

Does the loop reset when you play the script on Control Tower or in Studio?


The loop resets in Control Tower, there is around 18000 rows to go through on the table and as soon as it hits the last number it just resets within the same loop

Hi @shuan.vanhuyssteen just a kind reminder about sending the recording. We’ll try to reproduce this issue on our side.

When the process is playing in Control Tower, does it have any errors in the events log? Perhaps, it tries to repair a failing step, so it repeats the loop…