Oh yeah that would be awesome... I definitely think that's the future
It turns out that the detection itself is very fast and lightweight, so there was no need to optimize (background workers would've been a good idea though).
We somewhat optimized the CSS animation, but it's still not where we'd like to be... if anyone on here knows how to improve CSS animation performance beyond dropping frame rate / shortening the animation, I'd love to know. Tried some obvious things (z index, will-change).