[Project_owners] Measuring page layout time

Michael Vincent van Rantwijk noreply at yahoo.com
Tue Mar 13 06:10:08 PST 2007


Brian King wrote:
> A couple of browser questions:
> 
> It is pretty trivial to measure a page load time using a web progress 
> listener, but does anyone know how to measure page layout time?

Isn't nsIWebProgressListener.STATE_IS_DOCUMENT the one you are looking for?

p.s. page load times are inaccurate and that is why is was removed from 
the statusbar (see history of nsBrowserStatushandler.js).

> On another note, how does one associate/store data for individual tabs 
> when multiple are open, e.g. page load time?

I would extend onStateChange in tabbrowser.xml for this and use 
"this.mTab.myProperty = value;" over "this.mTab.setAttribute = value;"
because setting attributes in XBL is slower (see Hyatt's comment in 
nsBrowserStatushandler.js) and save the data as RDF in a new method or 
some JS function.

Michael


More information about the Project_owners mailing list