Why setInterval() laggs ?? | Sololearn: Learn to code for FREE!
Novo curso! Todo programador deveria aprender IA generativa!
Experimente uma aula grƔtis
+ 4

Why setInterval() laggs ??

I was firing a function every millisecond with setInterval(). But the function was not fired every milliseconds. It was getting lagged. Why is it so and what I can do if I want to fire setInterval() every millisecond without lagging ?

16th Feb 2019, 6:02 AM
Arushi Singhania
Arushi Singhania - avatar
2 Respostas
+ 1
Maybe it could do with the function executed by setInterval? Btw this effect is more pronounced with smaller intervals.
16th Feb 2019, 6:23 AM
šŸ‘‘ Prometheus šŸ‡øšŸ‡¬
šŸ‘‘ Prometheus šŸ‡øšŸ‡¬ - avatar