I know both ie and firefox have limits for javascript execution (Source 1, Source 2). Based on number of statements executed, I heard it was 5 million somewhere in IE and ba
The following article by Nicholas C. Zakas discusses how and when different browsers interrupt long running JavaScript code:
Breaking long processing code into small chunks and launching them with timers is in fact one way to get around this problem. The following Stack Overflow post suggests a method to tackle this:
On the other hand, web workers would be more suited for long running processing, since their execution happens in a separate process, and therefore does not block the UI thread:
However web workers are not supported in Internet Explorer yet, and they would not have access to the DOM.