If a "for loop" is slow and each iteration is taking 2 hours what are the recommended steps that I should follow to deal with this issue?
No products are associated with this question.
I would recommend that you first focus on what happens inside the for loop... why is it taking so long? Get a complete breakdown of how much time is spend at every step, then you can decide where you can possibly optimise.
Further details would be great.