I mentioned a few days ago that the bulk of our startup time is taken up by processing events, after we enter our main event loop. Here’s the set of events that take longer than 10us that gets processed during startup (on all threads, though this is mostly just main thread stuff). Working on getting timing for all of these, but here are the counts:
1 (PlacesEvent *) 1 (nsCSSFrameConstructor::RestyleEvent *) 1 (nsCancelHTTPDownloadEvent *) 1 (nsThreadPool *) 1 (nsThreadShutdownEvent *) 1 (nsTransportStatusEvent *) 2 (nsRunnableMethod*) 3 (PresShell::ReflowEvent *) 3 (nsGfxScrollFrameInner::AsyncScrollPortEvent *) 3 (nsHTTPDownloadEvent *) 3 (nsProxyObjectCallInfo *) 3 (nsRunnableMethod *) 6 (nsSocketEvent *) 7 (nsHttpConnectionMgr::nsConnEvent *) 11 (nsTimerEvent *) 24 (nsImageBoxFrameEvent *) 29 (nsNonOwningRunnableMethod *) 41 (nsInputStreamReadyEvent *)
nsImageBoxFrameEvents seem to dispatch the ‘onload’ event to image elements. The nsProxyObjectCallInfo events seem to mainly be dispatching ‘notifyObsevers’ to the observer service. The ReflowEvents are there for hiddenwindow.xhtml, browser.xul, and about:blank. Not sure about the others yet, but the important piece will be to figure out how long they take… sure wish we had some way to identify Runnables without going into gdb.
Edit: Forgot, this is just the set of events that take longer than > 10us.
> sure wish we had some way to identify Runnables without going into gdb.
I have a patch that does this on linux.