javascript - loop is too slow for IE7/8 -


i have loop execution needs run in browsers.

in chrome/ff etc execution runs fast , fine. in ie it's slow , end's dispatching prompt saying script running slow (no good).

any ideas on how around this? need rid of ie prompt 7/8

** edit **

here's code:

if(this.handicap()) {     while(this.hasgraphchanged()) {         this.gravity(this.separate());     } } 

this large project, instead of listing code, i'll go quick explanation.

this.handicap: returns true if browser if ie7/8 this.haschanged: returns true/false depending if there change after draw update this.gravity: processes drawing algorithm based on p1(array)

you can use asynchronous iteration technique instead of loops. watch asynchronous iteration patterns pedro teixeira nice introduction. uses node.js can use same patterns in browser.


Comments

Popular posts from this blog

Javascript line number mapping -

linux - Mailx and Gmail nss config dir -

c# - Is it possible to remove an existing registration from Autofac container builder? -