I have a computational application in JavaScript that has 0.01% chance of causing the browser to give user a script stalling warning.
Assume the script continues without the warning, it would finish in under 5 seconds. I was wondering if anyone know how to prevent that warning from ever popping up.
The warning is there to stop excessive ram or CPU usage, if you can break that usage up it can prevent the warning, either rewrite your code to reduce load, or add break points in the code where you can do something like:
Code:
function intensiveBit1(){
// some stuff here
setTimeout(intensiveBit2, 500);// wait half a sec
}
function intensiveBit2(){
// then some more stuff
setTimeout(intensiveBit3, 500);// wait half a sec
}
function intensiveBit3(){
// last bits of your function or whatever
}
If you are using PHP please use the [PHP] and [/PHP] forum tags for highlighting...
The same applies to HTML and the forums [HTML][/HTML] tags.
Bookmarks