Darrell Norton's Blog [MVP]

Sponsors

The Lounge

News

  • Darrell Norton pic

    MVP logo

    View Darrell Norton's profile on LinkedIn

    Currently Reading:

    weewar.com

Advertisement

Images in this post missing? We recently lost them in a site migration. We're working to restore these as you read this. Should you need an image in an emergency, please contact us at imagehelp@codebetter.com
Speeding up Firefox the right way

Speeding up Firefox seems to be a meme going around the blogsphere lately. Most of the tips I’ve seen, though, are only for broadband connections with the latest hardware and only include some of the settings that would affect performance.

The Firefox Tweak Guide has the full details on how to speed up Firefox regardless of your connection or hardware, reprinted in part below. Don’t forget that the easiest way to tweak user files is with chromEdit extension.

 

Common to all configurations

These are the settings that seem to be common to all configuration files regardless of connection speed or computer speed with a couple of additions - plugin paths can be found with about:plugins and the bookmark menu delay is turned off.

user_pref("network.http.pipelining", true);
user_pref("network.http.proxy.pipelining", true);
user_pref("network.http.pipelining.maxrequests", 8);
user_pref("content.notify.backoffcount", 5);
user_pref("plugin.expose_full_path", true);
user_pref("ui.submenuDelay", 0);

Fast Computer Fast Connection

user_pref("content.interrupt.parsing", true);
user_pref("content.max.tokenizing.time", 2250000);
user_pref("content.notify.interval", 750000);
user_pref("content.notify.ontimer", true);
user_pref("content.switch.threshold", 750000);
user_pref("nglayout.initialpaint.delay", 0);
user_pref("network.http.max-connections", 48);
user_pref("network.http.max-connections-per-server", 16);
user_pref("network.http.max-persistent-connections-per-proxy", 16);
user_pref("network.http.max-persistent-connections-per-server", 8);
user_pref("browser.cache.memory.capacity", 65536);

A couple settings of note - Firefox is allocated 4096 KB of memory by default and in this configuration we give it roughly 65MB as denoted by the last line. This can be changed according to what is used.

Fast Computer, Slower Connection

This configuration is more suited to people without ultra fast connections. We are not talking about dial up connections but slower DSL / Cable connections.

user_pref("content.max.tokenizing.time", 2250000);
user_pref("content.notify.interval", 750000);
user_pref("content.notify.ontimer", true);
user_pref("content.switch.threshold", 750000);
user_pref("network.http.max-connections", 48);
user_pref("network.http.max-connections-per-server", 16);
user_pref("network.http.max-persistent-connections-per-proxy", 16);
user_pref("network.http.max-persistent-connections-per-server", 8);
user_pref("nglayout.initialpaint.delay", 0);
user_pref("browser.cache.memory.capacity", 65536);

Fast Computer, Slow Connection

user_pref("browser.xul.error_pages.enabled", true);
user_pref("content.interrupt.parsing", true);
user_pref("content.max.tokenizing.time", 3000000);
user_pref("content.maxtextrun", 8191);
user_pref("content.notify.interval", 750000);
user_pref("content.notify.ontimer", true);
user_pref("content.switch.threshold", 750000);
user_pref("network.http.max-connections", 32);
user_pref("network.http.max-connections-per-server", 8);
user_pref("network.http.max-persistent-connections-per-proxy", 8);
user_pref("network.http.max-persistent-connections-per-server", 4);
user_pref("nglayout.initialpaint.delay", 0);
user_pref("browser.cache.memory.capacity", 65536);

Slow Computer, Fast Connection

user_pref("content.max.tokenizing.time", 3000000);
user_pref("content.notify.backoffcount", 5);
user_pref("content.notify.interval", 1000000);
user_pref("content.notify.ontimer", true);
user_pref("content.switch.threshold", 1000000);
user_pref("content.maxtextrun", 4095);
user_pref("nglayout.initialpaint.delay", 1000);
user_pref("network.http.max-connections", 48);
user_pref("network.http.max-connections-per-server", 16);
user_pref("network.http.max-persistent-connections-per-proxy", 16);
user_pref("network.http.max-persistent-connections-per-server", 8);
user_pref("dom.disable_window_status_change", true);

One of the changes made for this particular configuration is the final line where the status bar is disabled for changing web pages to save processor time.

Slow Computer, Slow Connection

We have entered the doldrums of the dial-up user

user_pref("content.max.tokenizing.time", 2250000);
user_pref("content.notify.interval", 750000);
user_pref("content.notify.ontimer", true);
user_pref("content.switch.threshold", 750000);
user_pref("nglayout.initialpaint.delay", 750);
user_pref("network.http.max-connections", 32);
user_pref("network.http.max-connections-per-server", 8);
user_pref("network.http.max-persistent-connections-per-proxy", 8);
user_pref("network.http.max-persistent-connections-per-server", 4);
user_pref("dom.disable_window_status_change", true);


Posted Fri, Jan 28 2005 6:33 AM by Darrell Norton
Filed under:

[Advertisement]

Comments

TrackBack wrote .NET Nightly 172
on Fri, Jan 28 2005 2:58 PM
TrackBack wrote Speeding Up Firefox
on Sun, Jan 30 2005 6:21 AM
I am sure most Firefox power-users have seen the optimized builds for the various operating systems. It is also possible to make changes that will increase performance yourself using the about:config panel. Basically just run Firefox, type about:config in the...
TrackBack wrote links for 2005-01-30
on Sun, Jan 30 2005 3:24 PM
Speeding up Firefox the right way (categories: firefox tips)...
letenky wrote re: Speeding up Firefox the right way
on Mon, Jan 31 2005 3:06 AM
Fine way to speed up loading firefox is to compress it's exe and dll libraries.

You'll get smaller exe size, thus shorter loading time - it minimalizes the difference between IE and FF. With this and with tuning described in this article you'll get the fastest browser ever build :)

Pretty good tool is UPX.org [command line only, good compression ratio, freeware].
Darrell wrote re: Speeding up Firefox the right way
on Mon, Jan 31 2005 6:13 AM
Thanks letenky, I will have to check that out.
svuntcake wrote re: Speeding up Firefox the right way
on Mon, Jan 31 2005 8:00 AM
Disabling IPv6 lookup can also greatly improve initial page load performance. It is enabled by default.

user_pref("network.dns.disableIPv6", true);
svuntcake wrote re: Speeding up Firefox the right way
on Mon, Jan 31 2005 8:12 AM
Here is a quick command to compress all .exe and .dll files with UPX.

After downloading and extracting UPX, execute the following statement on the command line in the extracted directory:

for %v in (*.exe *.dll components\*.dll plugins\*.dll) upx "C:\Program Files\Mozilla Firefox\%v"
svuntcake wrote re: Speeding up Firefox the right way
on Mon, Jan 31 2005 8:13 AM
Oops, I forgot the do portion ;)

for %v in (*.exe *.dll components\*.dll plugins\*.dll) do upx "C:\Program Files\Mozilla Firefox\%v"
Nick Douglas wrote re: Speeding up Firefox the right way
on Mon, Jan 31 2005 8:24 AM
For these directions, what's the line between "slow" and "fast" computers?
Darrell wrote re: Speeding up Firefox the right way
on Mon, Jan 31 2005 10:06 AM
Nick - At least a gigahertz processor with a decent amount of RAM.
Darrell wrote re: Speeding up Firefox the right way
on Mon, Jan 31 2005 10:06 AM
svuntcake - Thanks!
svuntcake wrote re: Speeding up Firefox the right way
on Mon, Jan 31 2005 10:42 AM
Here is a link to a mozillaZine thread for those interested in what some of the "voodoo" tuning variables do. Perhaps "Speeding up Firefox the right way" was written to avoid that confusing mess, but it is a good reference nontheless. There are quite a few trial and error posts that have proven quite helpful to me many times in the past.

http://forums.mozillazine.org/viewtopic.php?t=53650
TrackBack wrote links for 2005-02-01
on Mon, Jan 31 2005 4:26 PM
Speeding up Firefox the right way (categories: firefox tweak) paper cd case (categories: cd) One Life, Take Two (categories: blogs parenting) XUL Apps > Tabbrowser Extensions - outsider reflex (categories: firefox tweak extensions)...
TrackBack wrote How to speed up FireFox - like it could get any faster
on Mon, Jan 31 2005 7:41 PM
koz1000 wrote re: Speeding up Firefox the right way
on Mon, Jan 31 2005 10:17 PM
How come I see all of these blogs mention these little config hacks to speed up Firefox, but nobody mentions the Moox custom builds?

http://www.moox.ws/tech/mozilla/

You might get a lot more speed out of a Firefox built for your K-RAD processor instead of a generic 586.
gongadze wrote re: Speeding up Firefox the right way - svuntcake
on Mon, Jan 31 2005 10:39 PM
Hi svuntcake!

Here is your quick command in batch file with decompress option.( for a symmetric world )
#################################################
@echo off
goto upxFirefox%1
:upxFirefox
for %%v in (*.exe *.dll components\*.dll plugins\*.dll) do upx -v -9 %%v
exit
:upxFirefox-d
for %%v in (*.exe *.dll components\*.dll plugins\*.dll) do upx -v -d %%v
exit
:upxFirefox-h
echo Usage: upxFirefox [OPTION]
echo Compresses the binaries without arguments
echo .
echo -d decompress the upxed firefox binaries.
echo -h print this help.
#################################################
bob wrote re: Speeding up Firefox the right way
on Tue, Feb 1 2005 2:47 AM
fast computer fast connection and fast computer slow connection both have

user_pref("content.interrupt.parsing", true);

but fast computer slower connection does not have that setting: shurely shome mishtake?
heretic wrote re: Speeding up Firefox the right way
on Tue, Feb 1 2005 7:11 AM
lenetky:

'One way to speed up loading firefox is to compress it's exe and dll libraries.

You'll get smaller exe size, thus shorter loading time..."

are you off your swede? How is forcing me to decompress the binary and dlls before executing going to make things _faster_?

TrackBack wrote Speeding Up firefox
on Tue, Feb 1 2005 12:11 PM
TrackBack wrote Speeding up a sped up Firefox
on Thu, Feb 3 2005 2:47 AM
TrackBack wrote re: Faster Firefox
on Mon, Feb 7 2005 8:18 AM
TrackBack wrote More on speeding up Firefox
on Mon, Feb 7 2005 9:36 AM
Coder Darrell Norton posts a follow-up to widely-distributed instructions on how to to speed up Firefox. The original tip applies to only the latest hardware and doesn't cover all the possible settings. Darrell's further explanation includes instructions for fast computers...
Josh wrote re: Speeding up Firefox the right way
on Mon, Feb 7 2005 11:13 AM
The network.http.max-* tweaks are _bad_.

9) Has anybody tried these new optimized settings for Mozilla/Firefox? They're tweaked and they give a big speed boost!

A:There appear to be a bunch of optimizations circling around which claim you can speed up your surfing if you're on a broadband connection. Before you apply any such tweaks, it's important to understand which category they fall into:

Pipelining Tweaks
These usually take the form of telling you to adjust settings in the "network.http.pipelining..." tree. These are quite safe, but may cause problems with older web servers which do not understand pipelining properly. Pipelining works by sending requests simultaneously over a single connection - this avoids the delay incurred by the latency between you and the server. Traditionally, HTTP clients go:

REQUEST ->
<- RESPONSE
REQUEST ->
<- RESPONSE

Pipelining changes this to:

REQUEST REQUEST ->
<- RESPONSE RESPONSE

This is a good optimization/tweak to apply as it increases speed for both you and the web server.

Connection Tweaks
The "other" type of optimization commonly seen instructs you to alter the "network.http.max-persistent-connections-per-server", "network.http.max-connections-per-server" and other related settings. These are EXTREMELY DAMAGING "optimizations" to apply and should be avoided at all costs. These settings violate the HTTP protocol, which recommends a limit of 2 connections per server. When you increase it beyond that, a lot of bad things begin to happen:

The web server is often the hardest hit. The Apache web server maintains a number of "slots" which are processes lying around to handle requests as they come in. Since they usually come in at a steady rate, the server can create and destroy extra processes as needed to handle the load. When you and your "optimized" settings hit the server however, almost all of the slots that are idle are suddenly taken up by your browser. This forces the server to suddenly create a bunch of new processes to handle other traffic which is a CPU-intensive task. When you are done hogging up the slots, the server suddenly finds itself with way more processes than are needed for normal traffic, so it will kill off the extra ones.

What's worse is that since most tweaks involve such a high number of connections, once one element has been transferred, the connection is never used again. This forces the web server to hold all the connections in "keepalive" state as under normal circumstances, more than one request is sent per connection. TCP never gets a chance to automatically find the best RWIN for greatest speeds, load on routers between you and the server is increased thanks to all the extra packets... the whole basis of the HTTP/1.1 specification was to get away from the "one connection per element" days of HTTP/1.0, by applying these tweaks you are simply going back to the 1.0 days.

It's also worth pointing out that there exists an Apache module and netfilter settings that could cause your additional connections to be blocked from the server, resulting in very slow page load times, broken images and possibly even a complete IP ban for this "flooding" behaviour. Please, stick with pipelining and do not touch these settings. There is a very good reason why they are not the default.

If you have read and understood this entry thoroughly, you will notice that enabling pipelining will give you HIGHER performance than increasing the maximum number of connections! This is because with pipelining, even though there are only 2 connections to the target web server, you are still sending all your requests at once. Since you are re-using the same connection, TCP has a chance to tune the Receive Window, keep-alive is made useful and everyone is happy.

From http://forums.somethingawful.com/showthread.php?threadid=1140297
TrackBack wrote re: .NET Nightly 172
on Mon, Feb 7 2005 11:28 AM
moeffju wrote re: Speeding up Firefox the right way
on Mon, Feb 7 2005 5:37 PM
heretic:
> are you off your swede? How is forcing me to decompress the binary and dlls before executing going to make things _faster_?

Disk I/O is more expensive than memory I/O and CPU. Thus loading a smaller file, but decompressing it in memory, can be faster.
me wrote RE: josh
on Mon, Feb 7 2005 8:34 PM
network.http.max-connections-per-server defaults to 8. Sure you don't want to revise your little scary story up there?
Josh wrote re: Speeding up Firefox the right way
on Mon, Feb 7 2005 10:38 PM
_Persistant_ connections default to 2. That said, doubling the number of concurrant connections to a web server is, if nothing else, _rude_.
TrackBack wrote Sue??os Transitables &raquo; Algunos enlaces
on Tue, Feb 8 2005 2:16 AM
Sue??os Transitables &raquo; Algunos enlaces
TrackBack wrote links for 2005-02-08
on Tue, Feb 8 2005 10:25 AM
SLOWER.NET LOG: B&W Conversion (categories: photos) Speeding up Firefox the right way (categories: firefox) The Cranky Liberal Pages: The GOP Thinks I'm an Idiot - And You Are Too... (categories: political) FactCheck.org - Annenberg Political Fact Check (categories: politcal) 2.4 GHz Detector Ring Project I have a general rule...
TrackBack wrote Today's Jots posts
on Tue, Feb 8 2005 6:06 PM

<ul class="jotsBookmarks">

<li><a href="http://www.sneakeasysjoint.com/thecyclingdude/2005/01/california_tour.html"><span class="jotsBookmarkTitle">The Cycling Dude: California tourist and visitor bureau list</span></a>
<br><span class="jotsBookmarkDescription">collection of links to some of the California tourist, visitor bureaus...
wewa wrote re: Speeding up Firefox the right way
on Sun, Feb 20 2005 1:28 PM
you should un italicize the config lines.
you make it harder to copy/paste into our firefox configs.
thanks.
TrackBack wrote Making Firefox Fast
on Wed, Feb 23 2005 7:27 AM
Speeding up Firefox the right way Darrell Norton reports on several ways to speed up Firefox. Follow the link to get all the details. Speeding up Firefox seems to be a meme going around the blogsphere lately. Most of the...
The Official Website of Dan Crouch » Blog Archive » Why Aren’t You Using Firefox? wrote The Official Website of Dan Crouch &raquo; Blog Archive &raquo; Why Aren&#8217;t You Using Firefox?
on Sun, Apr 30 2006 8:57 PM
Speeding up Firefox the right way - The Digg Effect - Search for Diggs or get Dugg wrote Speeding up Firefox the right way - The Digg Effect - Search for Diggs or get Dugg
on Thu, May 25 2006 12:02 AM
ScottD's Musings wrote Recent Web Finds
on Sat, May 27 2006 1:30 AM
Just wanted to share some interesting finds...

Frans is stirring the pot again...
This is dissapointing......
Speeding up Firefox the right way at Cybergenie wrote Speeding up Firefox the right way at Cybergenie
on Sun, Jun 4 2006 10:03 AM
Software » Speeding up Firefox the right way wrote Software &raquo; Speeding up Firefox the right way
on Thu, Aug 24 2006 8:07 AM
DJ Drue - Throw some more logs on the firefox.... wrote DJ Drue - Throw some more logs on the firefox....
on Tue, Aug 29 2006 1:15 AM
Throw some more logs on the firefox.... by djdrue () | LjSEEK.COM wrote Throw some more logs on the firefox.... by djdrue () | LjSEEK.COM
on Tue, Aug 29 2006 1:15 AM
The CodeMode Chronicles / links for 2006-09-01 wrote The CodeMode Chronicles / links for 2006-09-01
on Mon, Sep 4 2006 9:55 AM
vanter wrote 关于FireFox的启动速度及优化
on Wed, Nov 29 2006 8:45 PM

# 主页设定:about:blank # 取消启动时候:检查是否为默认浏览器 # 在启动ff的快捷方式里面加入启动参数: /Prefetch:1,也就是比如: 如 “C:\Program Files\Mozilla Firefox\firefox.exe” /Prefetch:1 # 另外在你的 FF 快捷方式后面加上 -turbo (FF的启动速度 也会加快) 如

i prefer pi » Blog-speak wrote i prefer pi &raquo; Blog-speak
on Fri, Jan 5 2007 2:20 PM
Popular Diggs » Speeding up Firefox the right way wrote Popular Diggs &raquo; Speeding up Firefox the right way
on Tue, Feb 6 2007 1:23 AM
Firefox’s Memory Leak Bug or a Feature ? « geek-o-pedia wrote Firefox&#8217;s Memory Leak Bug or a Feature ? &laquo; geek-o-pedia
on Sun, Feb 25 2007 5:47 AM
Firefox tips « baysao’s blog wrote Firefox tips &laquo; baysao&#8217;s blog
on Tue, Apr 10 2007 6:24 PM
» Velocizzare Firefox - FOLBlog wrote &raquo; Velocizzare Firefox - FOLBlog
on Sat, Jun 23 2007 10:57 AM

Pingback from  &raquo; Velocizzare Firefox - FOLBlog

JooIT | ??????FireFox???????????????????????? wrote JooIT | ??????FireFox????????????????????????
on Fri, Jul 13 2007 9:23 AM

Pingback from  JooIT | ??????FireFox????????????????????????

Speeding up Firefox the right way « agrotime wrote Speeding up Firefox the right way &laquo; agrotime
on Sat, Aug 18 2007 4:17 PM

Pingback from  Speeding up Firefox the right way &laquo; agrotime

???????????? » How to: speed up your firefox wrote ???????????? &raquo; How to: speed up your firefox
on Thu, Aug 30 2007 3:24 AM

Pingback from  ???????????? &raquo; How to: speed up your firefox

Speed up firefox 10 Faster - Computer Forums wrote Speed up firefox 10 Faster - Computer Forums
on Sat, Sep 15 2007 10:58 AM

Pingback from  Speed up firefox 10 Faster - Computer Forums

http://www.ablogaboutnothing.com - Speeding up Firefox wrote http://www.ablogaboutnothing.com - Speeding up Firefox
on Mon, Sep 17 2007 5:05 PM

Pingback from  www.ablogaboutnothing.com - Speeding up Firefox

Speeding Up Firefox | Crazy Blogging World wrote Speeding Up Firefox | Crazy Blogging World
on Thu, Nov 1 2007 2:34 PM

Pingback from  Speeding Up Firefox | Crazy Blogging World

FireFox About:Config tweaks | Crazy Blogging World wrote FireFox About:Config tweaks | Crazy Blogging World
on Wed, Nov 21 2007 11:15 AM

Pingback from  FireFox About:Config tweaks | Crazy Blogging World

Zangoole » نحوه صحیح افزایش سرعت فایرفاکس wrote Zangoole &raquo; نحوه صحیح افزایش سرعت فایرفاکس
on Mon, Nov 26 2007 12:26 PM

Pingback from  Zangoole  &raquo; نحوه صحیح افزایش سرعت فایرفاکس

Speeding Up Firefox - Traders Laboratory wrote Speeding Up Firefox - Traders Laboratory
on Tue, Feb 26 2008 7:49 PM

Pingback from  Speeding Up Firefox - Traders Laboratory

Cum sa porneasca mai repede Mozilla Firefox - TORRENTs.RO wrote Cum sa porneasca mai repede Mozilla Firefox - TORRENTs.RO
on Thu, Feb 28 2008 4:40 AM

Pingback from  Cum sa porneasca mai repede Mozilla Firefox - TORRENTs.RO

http://codebetter.com/blogs/darrell.norton/archive/2005/01/28/48720.aspx wrote http://codebetter.com/blogs/darrell.norton/archive/2005/01/28/48720.aspx
on Fri, Mar 21 2008 2:23 AM
http://sourcesafe.codebetter.com/blogs/darrell.norton/archive/2005/01/28/48720.aspx wrote http://sourcesafe.codebetter.com/blogs/darrell.norton/archive/2005/01/28/48720.aspx
on Fri, Mar 21 2008 2:23 AM
How to speed up your Firefox! | ReviewSaurus - The Techie Dino! wrote How to speed up your Firefox! | ReviewSaurus - The Techie Dino!
on Wed, Apr 2 2008 10:13 AM

Pingback from  How to speed up your Firefox! | ReviewSaurus - The Techie Dino!

Codemonkey » Blog Archive » Speeding Up Firefox wrote Codemonkey &raquo; Blog Archive &raquo; Speeding Up Firefox
on Mon, May 26 2008 10:40 AM

Pingback from  Codemonkey  &raquo; Blog Archive   &raquo; Speeding Up Firefox

firefox tweaks wrote firefox tweaks
on Thu, May 29 2008 11:45 PM

Pingback from  firefox tweaks

IWebThereforeIAm wrote Speeding up FireFox the right way
on Sun, Jun 15 2008 11:26 AM

[Speeding up FireFox the right way] [FireFox tweaks]...

Firefox 101: A practical guide - Kongtechnology.com wrote Firefox 101: A practical guide - Kongtechnology.com
on Fri, Jun 20 2008 12:48 AM

Pingback from  Firefox 101: A practical guide - Kongtechnology.com