Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

My concern is that the CPU usage is very high when you are not actively interacting with the site. So if you leave the tab open, then go do something else, you will be wasting a lot of CPU resources.

The only real way around that would be to put in a 5FPS cap after a minute of idle time (no mouse movements or scrolling), and additional culling for things that have scrolled out of view.



Every browser I've come across suspends `requestAnimationFrame` callbacks when the page is not the focused tab. You won't be wasting resources, the animations will all suspend when you're not looking at them.




Consider applying for YC's Summer 2026 batch! Applications are open till May 4

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: