[Project_owners] intensive recursions in Javascript

Preet Shihn preetshihn at gmail.com
Mon May 7 12:14:31 PDT 2007

I am using Canvas.. I can not use SVG... well not now at least, unless i
revamp a whole lot of code.
Filling is easy using canvas at the time you want to  draw, but filling
later..after it has been drawn requires pixel manipulation, for which I am
using the flood fill algorithm.

I guess I can use window.setTimeout but it will just avoid that script
dialog to pop-up, but the whole performance issue still exists. I am going
to try it and see what performance stats I get.

- Preet

On 5/7/07, Matthew Wilson <matthew at mjwilson.demon.co.uk> wrote:
> 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?
> Matthew
> _______________________________________________
> Project_owners mailing list
> Project_owners at mozdev.org
> http://mozdev.org/mailman/listinfo/project_owners
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mozdev.org/pipermail/project_owners/attachments/20070507/6b059a72/attachment.html 

More information about the Project_owners mailing list