gpoesia/loopye

Loops with too many iterations make the browser hang

Closed this issue · 0 comments

How to reproduce: Run something like "100000{R}" on any lesson.

Because we run all steps and render the animation in advance (and JavaScript is single-threaded), this hangs the browser (or at least our tab in the best case). Even if we allowed it run, it doesn't seem like a good idea.

The fix would be to simply set a limit on the number of iterations of bounded loops. For what we have now, 10 would be enough for all existing levels.