Live data from Hacker News

Ask YC: A way to measure page render time?

news.ycombinator.com

11–13 of 13 posts

Re: Ask YC: A way to measure page render time?

#12
One more thing to do would be to add a start_time via js on the top of the page. Then, another at the tail end of the page - then use a javascript function to calculate the difference. This will give you the time for the server (or your web app). [You can also do some code to your controller or view - however you have it to generalize for all pages].

Now, this time is not the same as the time that firefox takes to display the page. For this, you will have to use the start time on head and then use a js function that will be called on body onload. This can now take the difference and show you the browser rendering time alone.

I have often seen that some pages get generated in the server in under half a second, but takes more than a few seconds for firefox to render. [For example, table with lots of rows, with lots of divs and esp. if there is any dynamic modification of nodes].

Another technique I use is to also display the times for both server/browser, only when I am logged in - and also use color codes to show the severity of the situation. [Like Green for under half a second, red for over a second..etc].

Post reply on HN