use animation best practices in dbmon

This commit is contained in:
Leo Horie 2016-12-02 20:44:03 -05:00
parent 2f7c4983f3
commit 4a4bd7a548
8 changed files with 48 additions and 2299 deletions

View file

@ -35,13 +35,13 @@ m.mount(document.getElementById("app"), {
})
function update() {
requestAnimationFrame(update)
data = ENV.generateData().toArray()
perfMonitor.startProfile("render")
m.redraw()
perfMonitor.endProfile("render")
setTimeout(update, ENV.timeout)
}
update()