From 595f00f82a269b96a3e15f604b9c24389c11f5e7 Mon Sep 17 00:00:00 2001 From: Andreas Gal Date: Wed, 15 Jun 2011 00:20:26 -0700 Subject: [PATCH] measure load/compile/render times --- test.html | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/test.html b/test.html index e59d0577e..9cadf2e1f 100644 --- a/test.html +++ b/test.html @@ -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() {