Firefox/Projects/StartupPerformance/MeasuringStartup: Difference between revisions

From MozillaWiki
Jump to navigation Jump to search
(Created page with 'We've been using a method Vlad blogged about [http://blog.vlad1.com/2009/07/28/measuring-startup/ here]. The steps are below. # save [http://people.mozilla.com/~vladimir/misc/st…')
 
mNo edit summary
 
(4 intermediate revisions by 2 users not shown)
Line 1: Line 1:
We've been using a method Vlad blogged about [http://blog.vlad1.com/2009/07/28/measuring-startup/ here]. The steps are below.
The best way to measure startup performance is via the [https://addons.mozilla.org/en-US/firefox/addon/about-startup/ about:startup] addon.  


# save [http://people.mozilla.com/~vladimir/misc/startup.html this html file] somewhere locally
After installing the addon, go to about:startup to see the measurements. The meaning of gathered numbers is described in the above link.<br>
# create a new profile, run Firefox with it at least once, so all files are created, etc
# execute this command, with your profile name substituted, and invoking firefox in a way appropriate for your platform:


<code>
There are 2 kinds of browser startup to consider: warm and cold. <br>  
./firefox -P YourProfileName -no-remote file:///..../startup.html#`python -c 'import time; print int(time.time() * 1000);'`
</code>


==Cold startup on Mac==
*''Warm startup'' is when one runs the browser soon after closing it. Typically the operating system has everything cached in RAM during warm startup. To measure warm startup one should close the browser and immediately start it again.<br>  
The following is specific to Mac OSX and is required to evict Firefox code pages from memory and clear the Unified Buffer Cache (UBC). <code>purge</code> does NOT do this.
*''Cold startup'' is when the operating systems must load everything from disk. The best way to test cold startup is to reboot your computer in between restarting the browser.<br>
 
<pre>
#!/bin/sh
 
FF=/Volumes/Fujitsu80Gb
 
diskutil unmount force $FF
diskutil mount /dev/disk1s2
 
$FF/Minefield$*.app/Contents/MacOS/firefox-bin -no-remote -foreground -P clean file://$FF/startup.html#`python -c 'import time; print int(time.time() * 1000);'`
</pre>
 
This assumes that your removable media is at /dev/disk1s2.

Latest revision as of 22:46, 19 April 2011

The best way to measure startup performance is via the about:startup addon.

After installing the addon, go to about:startup to see the measurements. The meaning of gathered numbers is described in the above link.

There are 2 kinds of browser startup to consider: warm and cold.

  • Warm startup is when one runs the browser soon after closing it. Typically the operating system has everything cached in RAM during warm startup. To measure warm startup one should close the browser and immediately start it again.
  • Cold startup is when the operating systems must load everything from disk. The best way to test cold startup is to reboot your computer in between restarting the browser.