I mentioned in this post that the number of Runnable events processed during startup was significant. I’ve got a log of the events that are processed as well as the time it takes to do so in µsec. It’s missing a few events that take less than 10 µsec, but they’re mostly irrelevant. This is measuring just the time it actually takes to run the event; it’s not measuring time in between event loop invocations.
Also, playing around with iosnoop to look at cold start, out of 10,000 or so msec, about 7400 ms was spent doing IO. Doing libxul-related IO was 3280 ms out of that; it’s being read using sequential 1MB chunks, so it’s not an issue of jumping around. Touching things in the profile dir was 322 ms. Reading “dyld_shared_cache_i386″ is 1157 ms, and reading all of our xpt files was 390 ms. This last bit I can probably fix by linking the xpt files together into one; in this build, they’re still split out.
I did a non-libxul build to see if there would be any difference in cold start times… the results are inconclusive at best; I had some runs that were faster and some that were slower.
Could you not pre-load some files on startup?