TIP: Iterating large arrays

After many hard nights of trial and error, I have found a reliable (God I hope so) method for dealing with large hit results from a trace. This also applies to large arrays in general. I am talking about 500+ indexes.

  • Servers crash when throwing 1000+ iterations with no delay. You will need to build your own ForLoop macro and add a delay to it.
  • ALL proper delays must happen in the Event Graph
  • Store the hit results into an array variable, then iterate that array. GC could possibly kill your loop if it takes too long to complete.

ForLoop with Delay:


My macro library includes a ForEach /w Delay(I also needed a ForEach in reverse) but I just threw the delay before the sequence, delays the first loop too but that’s inconsequential for me.

ive been running a delay of 0.0125s (60 iterations a second) and it seems to be smooth without impacting server FPS.

Any other tips you could provide WM would be helpful.