[Project_owners] intensive recursions in Javascript

Matthew Wilson matthew at mjwilson.demon.co.uk
Mon May 7 11:55:22 PDT 2007

Preet Shihn wrote:
> Heyas!
> I am a semi-javascript newbie. I noticed that Javascript isn't really 
> great with long running recursive methods or a long running while loop 
> that can be memory intensive.
> I see the browser popup "A script on the page may be busy, or it may 
> have stopped responding..... Stop the script or continue". I was 
> wondering how people have dealt with this. An example of such a method 
> that I was implementing is Flood Fill. Basically, fill a contoor with a 
> specified colour.

Can you use SVG or Canvas to avoid the work?

Or use window.setTimeout to split up the work you're doing into chunks?


More information about the Project_owners mailing list