"For Each" is a system loop meaning the process has to finish before the rest of the rest of the tick can complete.
For occasions that require iterating over a large number of instances it would be better to do so per tick on each, or a small group of objects, rather than choking the cpu.
A variable compare is a decent method to do so.
global myindex < object.count
->object.variable= global myindex, do foo
->add 1 to global myindex