Click to See Complete Forum and Search --> : recursive functions.....


leechun
05-20-2003, 04:35 AM
hello everyone:

Is using constant recursive functions recommended? I have just done this page that has functions calling itself at regular interval, I just wonder that if this will be too much for the browser or system to deal with? The interval is 100ms. The reason I am asking this is that I have also tried embedded a audio loop at the same time in the page and is set to repeat itself, and for some reason, there is a small pause between each repeat. The repeat seems to sound better if I disable the JS in my browser.

many thanks

CHUN

Gollum
05-20-2003, 04:43 AM
If you mean that at the end of your function you set a timeout to call your function again 100ms later, then there is no problem - in fact this isn't even recursive as your function will exit before the window object calls it again (100ms later).

leechun
05-20-2003, 05:07 AM
thanks...

could you take a look at that page when you got time. it's at

www.sonicvariable.com
and in the "collaborative" page

cheers

CHUN