Loop Is Too Slow For IE7/8
I have a loop execution that needs to run in all browsers. in chrome/ff etc the execution runs fast and fine. in IE it's slow and end's up dispatching a prompt saying a script is r
Solution 1:
You can use some asynchronous iteration technique instead of loops. Watch Asynchronous Iteration Patterns by Pedro Teixeira for a nice introduction. It uses Node.js but you can use the same patterns in the browser.
Solution 2:
What exactly does the loop do? Is the number of iterations deterministic? If this is something which is causing the browser to hang you may want to consider javascript worker-threads https://developer.mozilla.org/En/Using_web_workers (although I'm not sure which browsers currently support this feature).
Post a Comment for "Loop Is Too Slow For IE7/8"