Firefox/Projects/Startup Time Improvements/joelr notes: Difference between revisions

Line 12: Line 12:


We already know that Firefox is slow to start up but this type of sampling neatly points the finger in the right direction. Props to Brendan Gregg for teaching me how to fish!
We already know that Firefox is slow to start up but this type of sampling neatly points the finger in the right direction. Props to Brendan Gregg for teaching me how to fish!
What kind of IO does Firefox do upon startup, though? I find the output from ''iosnoop'' a bit confusing so I whipped up [http://github.com/wagerlabs/firefox-startup/blob/7b78d70584bf9783d203e46786cbe800be4f5ba6/io.d a version of my own] that prints just disk access times, disk operation deltas, block size and file name accessed.
The script samples Firefox during the first 20 seconds of its life and the [http://pastie.org/595737 output from ''./cold.sh io.d''] looks like this:
<pre>
DELTA      DTIME      D    SIZE PATHNAME
1399      1407      R    4096 ??/dtrace/libdtrace_dyld.dylib
1141      1145      R    8192 ??/dtrace/libdtrace_dyld.dylib
1301      1305      R    4096 ??/MacOS/XUL
1701      1705      R    4096 ??/MacOS/XUL
11081      685        R    4096 ??/MacOS/libmozjs.dylib
1989      2253      R  36864 ??/MacOS/libmozjs.dylib
1768      1894      R  24576 ??/MacOS/libmozjs.dylib
27111      2135      R  200704 ??/MacOS/XUL
1411      1134      R    8192 ??/MacOS/libxpcom.dylib
1784      1968      R    4096 ??/MacOS/libplds4.dylib
2383      464        R    4096 ??/MacOS/libxpcom.dylib
2886      456        R    4096 ??/MacOS/libxpcom.dylib
1431      732        R    4096 ??/MacOS/libplds4.dylib
2640      706        R    4096 ??/MacOS/libnspr4.dylib
3092      484        R    4096 ??/MacOS/libnspr4.dylib
...
</pre>
I also have [http://github.com/wagerlabs/firefox-startup/blob/7b78d70584bf9783d203e46786cbe800be4f5ba6/iosum.d a version that rolls disk operations by file name and read/write op]. It also samples during 20 seconds and [http://pastie.org/595727 outputs something like this]:
<pre>
DELTA      DTIME        SIZE D PATHNAME
307        311          4096 R ??/en_US.ISO8859-1/LC_TIME
437        441          4096 R ??/pref/firefox-branding.js
439        443          4096 R ??/su3x40q6.2/extensions.cache
441        445          4096 R ??/en_US.ISO8859-1/LC_NUMERIC
640        644          4096 R ??/en_US.ISO8859-1/LC_MONETARY
643        648          4096 R ??/chrome/browser.manifest
644        650          4096 R ??/la_LN.US-ASCII/LC_COLLATE
645        650          4096 R ??/Firefox/profiles.ini
646        650          4096 R ??/chrome/en-US.manifest
...
</pre>
Moving on...


= Previous statuses =  
= Previous statuses =  
109

edits