site_archiver@lists.apple.com Delivered-To: darwin-dev@lists.apple.com On Aug 26, 2009, at 2:06 PM, Joel Reymont wrote: --- #!/bin/bash -- Greg Parker gparker@apple.com Runtime Wrangler _______________________________________________ Do not post admin requests to the list. They will be ignored. Darwin-dev mailing list (Darwin-dev@lists.apple.com) Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/darwin-dev/site_archiver%40lists.appl... I wrote io.d, a DTrace script and a derivative of iosnoop, to roll up disk io time during the first 20s of the Firefox startup [1]. I already have a 'cold startup' shell script that I use to trace Firefox, e.g. cmd="./Minefield.app/Contents/MacOS/firefox-bin -no-remote - foreground -P 2" sync && purge && dtrace -x dynvarsize=64m -x evaltime=exec -c "$cmd" -wZs $1 --- I cold-started and traced both Firefox [2] and Safari [3]. I now have a hunch that the slow Firefox startup may have a lot to do with the fact that most of the Safari bits are pulled from the dyld shared cache. Exercise: run both Safari and Firefox with environment variable DYLD_SHARED_REGION=avoid. This will turn off the dyld shared cache, removing that variable from your startup time measurements. If Safari is still faster to launch, it's not the shared cache's fault. DYLD_PRINT_STATISTICS may also be useful in identifying where your startup time is going. This email sent to site_archiver@lists.apple.com