CPU over working in setInterval() | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 1

CPU over working in setInterval()

CPU is over working when i use setInterval function in JS to refresh canvas in every 10ms, CPU is working above 60 . Is that normal? or can I fix it?

6th Jan 2019, 2:55 PM
Sachin M
Sachin M - avatar
1 Answer
+ 2
What did you do in each interval? If you create too much instance of a class and have heavy display, the animation will lag.
6th Jan 2019, 3:43 PM
Gordon
Gordon - avatar