Speeding up firefox

As a UNIX and network guy, I try to optimize systems and networks to deliver the most bang for the buck. I recently came across the following post on the Mozilla Zine web forums:

http://forums.mozillazine.org/viewtopic.php?t=53650

This link covers several tunables for Firefox, several of which can significantly speedup page load times (especially when you have a tabbed list of news sites):

network.http.max-connections: This value controls the maximum number of outbound TCP connections. network.http.max-connections accepts an integer value and defaults to 24.

network.http.max-connections-per-server: This value controls the number of concurrent requests to a single site. For sites that contains hundreds of URIs in a single page, this should speedup page load times (barring the remote site isn’t rate limiting inbound connections). network.http.max-connections-per-server accepts an integer value and defaults to 8.

network.http.max-persistent-connections-per-server && network.http.max-persistent-connections-per-proxy: These values control the number of persistent HTTP connections that can be maintainted to a website. Both parameters accept integer values and default to 2 and 4.

network.http.pipelining && network.http.proxy.pipelining: These values control the HTTP 1.1 pipelining feature, which allows multiple HTTP requests to be requested at connection setup. Both parameters accept boolean “true”/”false” values and default to “false.”

network.http.pipelining.maxrequests: This value controls the number of requests that will be issued at connection setup. network.http.pipelining.maxrequests accepts an integer value and defaults to 4.

You can tweak these settings by typing “about:config” into the Firefox navigation toolbar, or by directly editing the user.js preferences file. I picked my current values by adjusting the current values, clearing the cache, and calculating the time it took Firefox to load 50 tabs. I was able to cut 14 seconds off my news site load time by doubling, and sometimes tripling the default values :)

One Comment

SneakyWho_am_i  on December 6th, 2008

In Firefox 3 there is a new pipelining variable (and it’s present by default) which controls SSL.

An important caveat with these things is that SOME upgrades will reset http pipelining to its default values. SO, if your Firefox is a little sluggish it can pay to check that they are still how you like them (or switch to Opera :P ).

An important consideration is to not set everything too high. In extreme cases it will degrade your performance, and if it exceeds the RFC’s guidelines then you are a naughty and abusive client ;) … Initially I tried setting it to something ridiculous like ten thousand million – a moment of immaturity – but now I leave the number of max requests down around 8 or even 4. Only for large downloads do I use a download manager and chunk it out to 10 connections.

There used to be an extension called Fasterfox, too, but I think that it had some weird bugs, meaning it’s better to just adjust the stuff yourself.

Oh and another setting worth researching is initialpaintdelay (It’s not called that, but close)… It can show you the page sooner if you set a low delay, or it can eat less CPU time (due to reflows and images) if you set a longer/higher delay. So depending on your hardware, that setting can be a source of amusement.

Leave a Comment