Have you tried subscribing to Time.every
instead of Event.onAnimationFrame
?
To be honest I’m not sure if it’ll be enough on its own but it’s worth a shot. The Elm runtime only updates the DOM on requestAnimationFrame
anyway. So it could cut down on some unnecessary work.