Thursday, October 9, 2008

Profiling Attempt

I tried to optimize Firefox by using the Acid3 Test and Sunspider. These test the DOM and JavaScript respectively. Afterwards I loaded www.cnn.com 5 times, it was saved on the hard driver, and ran the Sunspider Test 5 times.

Profiling Results





















Firefox BuildCNN.com (AVG)SunSpider (AVG)
Minefield (non-pgo)2206.4n/a
Minefield (pgo)21263020.6
Firefox 3.0.32186.43002
***Note***
For each of the five runs I used the same Test User profile I created and cleared the private data with everything checked to ensure that nothing was pre-cached.

I didn't quite get the results I was expecting. I realize that Mozilla is probably doing some sort of profiling that captures the typical usage of an Internet User.

Dave Humphrey mentioned that Mozilla optimizes its browser for the top 100 sites ( cannot remember how many ). If these were used as the profiling data that would make sense why there is almost no difference between my PGO build and the Firefox release.

Next
  • Find out how Mozilla optimizes Firefox
  • Look into what is getting optimized in my pgo builds
  • Understand the pgo process a bit better

1 comment:

Ted Mielczarek said...

In fact, our current PGO profiling scenario consists of just starting the browser, and shutting it down after 10 seconds. It uses this script:
http://mxr.mozilla.org/mozilla-central/source/build/pgo/profileserver.py.in to launch the browser (and a local http server) and load this html file:
http://mxr.mozilla.org/mozilla-central/source/build/pgo/index.html?force=1

PGO can be tricky though, as it's hard to define what you want as representative. Acid3, for example, is a bad choice because it explicitly tests lots of edge cases that you shouldn't hit on the normal web.