Firefox Optimization
Configure Level Optimization
Reducing memory usage
Useful Add-ons:
Cache Status
Preferences -> Privacy:
disable Remember what I’ve downloaded
Use these settings at about:config:
browser.cache.memory.capacity 12288
browser.cache.memory.enable true
browser.history_expire_days 7
browser.sessionhistory.max_total_viewers 0
Optimize Speed
Disabling pango, it’s really slow, put this in ~/.bash_profile:
export MOZ_DISABLE_PANGO=1
Use these settings at about:config:
network.dns.disableIPv6 true
network.http.max-connections 32
network.http.max-persistent-connections-per-server 4
network.http.max-persistent-connections-per-proxy 8
network.http.pipelining true
network.http.pipelining.maxrequests 8
network.http.proxy.pipelining true
Compile Lever Optimization
The instruction for compiling firefox in here are based on Fedora.
Adjust the CFLAGS in /usr/lib/rpm/rpmrc for your target, and then select the correct target when build rpm:
rpmbuild -ba firefox.spec --target=i686
Code Level Optimization
I have not start the testing of code level optimization yet. Please let me know if you have any suggestion.
Leak detection tool: leak-monitor
Rendering Speed Test
Just need create a html file and this to head:
<script type="text/javascript">
// <![CDATA[
startDate = new Date();
startTime = startDate.getTime() / 1000;
function calceRenderingTime()
{
endDate = new Date();
endTime = endDate.getTime() / 1000;
alert(endTime - startTime);
}
// ]]>
</script>
and then invoke calceRenderingTime in body’s onload:
<body onload="calceRenderingTime();">