Re: "A script on this page may be busy"
Available news archives: comp.lang.tcl - comp.lang.python - comp.security.firewalls - sci.crypt - comp.lang.php - comp.lang.javascript
Google
 
Web news.hping.org


comp.lang.javascript archive

Re: "A script on this page may be busy"

From: Martin Honnen <mahotrash@yahoo.de>
Date: Mon Aug 22 2005 - 18:16:40 CEST

Philipp Lenssen wrote:

> Using Firefox and this Reversi script
> http://gamesforthebrain.com/game/reversi/ , I often get "A script on
> this page may be busy ..." warning message. I suspect to be the
> recursive min-max algorithm which takes too long in "Medium" mode -- it
> never happens in "Easy" mode.
>
> Is there anything I may try tweaking in the JS so users won't see this
> somewhat annoying message?

Mozilla's JavaScript debugger Venkman allows you to profile scripts so
that can be an approach to find out where your script spends (too) much
time.
In general if a script in a loop or recursion causes the script engine
to give such a warning then with client-side script one approach is to
try to break up the loop or recursion with different script blocks
calling each other with setTimeout or setInterval.

-- 
	Martin Honnen
	http://JavaScript.FAQTs.com/
Received on Tue Oct 18 03:11:33 2005