Make setInterval do as little work as possible

Layout and paint is ~2ms now.