The array has like 100.000 elements.
And when I loop over it, I noticed that the page freezes for a short period of time.
I read that to avoid this I need to loop over chunks of the array inside a setTimeout call, to let the browser "breathe" in between these calls.
But what if I use promises instead of setTimeout and run them in parallel instead of one after the other? So each promise would loop over a portion of the array, and update it. Would this create unexpected issues, like the array not being updated correctly?