Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

setInterval() method in my application ...

Status
Not open for further replies.

arunjp

Programmer
Jan 10, 2001
29
US
Hi !
I've used setInterval('doScroll()', 50) method in my application. I just want to make sure that the function doScroll() will be executed for every 50 millisecond, will there be any performance issue like 100% CPU usage in the client machine. What could be the optimal time interval for setInterval method so that the application would not give any CPU usage problem even for low config machines.

Thanks
AJP
 
setInterval(sString|fFunction,iMilliseconds):

will force sString or fFunction to execute every iMilliseconds, but only when the interpreter has a chance. In other words, setInterval will rarely (if ever?) take over the cpu. If you ware doing some absurd dhtml changes and executing every 1 millisecond, you may notice a performace issue (probably a lag). jared@eae.net -
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top