measure load/compile/render times

This commit is contained in:
Andreas Gal 2011-06-15 00:20:26 -07:00
parent 02df7f8e58
commit 595f00f82a

View File

@ -101,12 +101,14 @@ function displayPage(num) {
var fonts = [];
page.compile(gfx, fonts);
var t2 = Date.now();
// This should be called when font loading is complete
page.display(gfx);
var t2 = Date.now();
var t3 = Date.now();
infoDisplay.innerHTML = "Time to render: "+ (t1 - t0) + "/" + (t2 - t1) + " ms";
infoDisplay.innerHTML = "Time to load/compile/render: "+ (t1 - t0) + "/" + (t2 - t1) + "/" + (t3 - t2) + " ms";
}
function nextPage() {