This is a library I call RenderFarm. I use it to manage scroll, and request animation frame loops depending if the element is on the screen or not.