Optimizing JS animation frame engine.