Does letting active setInterval slow down the site?

Asked

Viewed 89 times

0

For example, I have a setInterval that will stay 1 in 1 second checking if the company chat is with any online attendant. If any attendant goes online, I give a clearInterval and stop the function, but, if no attendant goes online, it keeps running.

This may, after a certain time, slow down the site?

EDIT

The DVD answer is not very clear to me, I just want to know, can or can’t it slow down? La so is saying that it is recommended not to use, only that I need to use. I just wanted to be sure.

Thank you!

  • Yes friend, with a large number of requests in small periods of time the browser gets overloaded.

  • Hi Lucas! Dude, like I said in the checked response, using setInterval in server requests can generate crashes and bottlenecks, so, yes, the site slows down.

  • You can use setInterval, which is almost the same thing and will make the requests in an organized way, even in a 1 second interval. But the ideal is to increase this time so as not to overload the server.

  • Got it! Thank you all very much!!!

No answers

Browser other questions tagged

You are not signed in. Login or sign up in order to post.