merry christmas || MAIN || 1,286 firefox search plugins

December 26, 2004

how to speed up firefox?

After seeing at least a couple dozen blog posts all referencing these changes to "speed up Firefox", I thought it would be worth a little explanation.

Yes, enabling HTTP pipelining can dramatically improve networking performance. The downside, and the reason it's not enabled by default, is that it can prevent Web pages from displaying correctly. If you've enabled this, and you find pages that aren't displaying correctly, please don't blame Firefox or the Web developer. It's probably the fact that you enabled an "unsupported" feature which is incompatible with some Web servers and proxy servers.

The second change, setting the initial paint delay at zero, may get you some content on the screen faster, but it's worth noting that it will dramatically slow down the time it takes the entire page to display. Here's what's going on. Gecko, Firefox's rendering engine, is trying to optimize between the cost of waiting for a bit more data versus doing more painting and reflows as new data comes in. Waiting a bit longer before it starts painting the page gives Gecko a chance to receive more content before chewing up CPU cycles to render and reflow the document. If you drop this value down to zero or near zero, that means you'll see the page start displaying a bit earlier, but not having received much data in that short interval, you'll have a lot more paint and reflow cycles to complete rendering of the page.

This one probably comes down to a combination of bandwidth, CPU speed, and personal preference. If it works for you, and you don't mind the side-effects, then great. Just note that what works for one person/system, may not work for another.

Yes, there are tuning change you can make (even at compile time, see Moox' optimized builds) that will dramatically alter the performance characteristics of Firefox. Feel free to experiment, but remember that most of the defaults are defaults for a reason. If your browser starts misbehaving or web sites look broken, it might be worth going back to default settings.

Posted by asa at December 26, 2004 09:05 AM

OK, now, what would be great to have is Opera's page back/forward speeds. :-)

That's probably the single greatest thing with Opera. It just blows you away.

Too bad it hasn't got a nearly as evolved extension community (does it even have an extension API?), otherwise it would have been even more competitive with Firefox.

Posted by: Jugalator on December 26, 2004 11:38 AM

There are several servers which will have issues when you enable HTTP Pipelining. Google's social community (like Friendster) is one example. Turning on HTTP Pipelining causes numerous problems with images, etc.

Posted by: John T. Haller on December 26, 2004 04:17 PM

I have found that these tweeks cut my page load time in about half. I have a broadband connection through Verizon, but I have heard that if you try this while running on dial up it will only serve to slow down your browser. These are the settings that I have in case you want to try it out your self, and also how to do it.

This is how to activate them
Open Firefox and on the address bar write about:config and hit enter
find the string
double click and change the value to true
find the string
double click and change the value to 34
find the string
double click and change the value to true
now close and restart and see the new amazingly new speed of firefox...

Posted by: Sean Morrison on December 26, 2004 07:40 PM

How does one change the settings back if they've been tweaked.

Posted by: patrick on December 27, 2004 09:17 AM

Right click on the setting you want to reset, the click on reset in the context menu.

Posted by: Robb on December 27, 2004 09:51 AM

Please don't confuse "tuning" with "using a better optimizing compiler". Why does still use a compiler from 1998 to produce the official Windows builds?

Posted by: James on December 27, 2004 03:05 PM

James, I'm not a build engineer, but perhaps it's because we intend to support operating systems from 1998.

Also, there are compile time optimizations that don't require a better optimized compiler which we don't take advantage of because we'd like produce builds that work on more than just one flavor of processor. Again, I'm no build engineer, not even a developer, actually, but I'm sure that both approaches can improve the performance characteristics of a Firefox build and I'm sure there are reasons why our builds are produced as they are.

If you're interested in real build/config answers, you could post to the build newsgroup or email Chase.


Posted by: Asa Dotzler on December 27, 2004 05:10 PM

sean morrison: did you actually read the post before replying? the first two tweaks you mentioned are the ones asa's advising against in this post, and the third does *absolutely nothing*. the setting has been removed from the source, and it isn't even read in anymore.

Posted by: scratch on December 28, 2004 12:37 PM

is there any way to speed up opening a new browser window? I find pages that open in a new window take about 8 seconds on my p4/2.8GHz/1GB RAM winXPsp1 system.

also, if I open a PDF doc, the browser tends to freeze for a while and I can't switch tabs, etc until it loads. any way to improve this?


Posted by: fastfox on December 30, 2004 06:42 AM

While we're at it - I must say I LOVE FF BUT there's ONE thing...

About half the time I hit alt B for the book marks and try to scroll down they automatically scroll back up. I have to hit the bottom arrow to stop it.

Can this amazingly annoying thing be fixed please?

Posted by: Terry Smith on December 30, 2004 07:36 AM

James, the newer versions of MSVC++ do not necessarily produce faster versions of Firefox. I recall that a lot of DHTML testcases ran slower with Firefoxes built with later versions of VC++. Certainly these were not comprehensive tests and perhaps speed ups in other parts of Firefox compsenate for these slowdowns, but it is important to remember that a new compiler does not always mean a faster program.

Posted by: will on December 30, 2004 10:27 AM

"That's probably the single greatest thing with Opera. It just blows you away."

Of course it does. When you leave out decent DOM support, access to dynamic attributes, and out other "modern" browser features, you can blow almost anything away...

Posted by: Anony on December 30, 2004 10:55 AM

Love Firefox! I added all of the "optimizations" the OP refered to and saw no dramatic improvement, nor did I see problems, YMMV...back to the defaults for me.

One thing I would like to see "fixed" is a home page problem I have. If I set my home page to a bookmark, and that bookmark is a folder, then when I launch Firefox I get all of my 8 or 9 daily, must visit sites opened up as tabs which is WONDERFUL! Problem is, if I add a new bookmark to the folder or delete bookmarks from the folder they do not show up, even if I close and reload the browser or hit the home button! The ONLY way I can get them to show up is to reset my homepage to the bookmarked folder. Perhaps this was not an intended feature, but I love having all my favorite sites open up when I start the browser.

Posted by: TonyK on December 30, 2004 11:29 AM

Just wanted to mention (I put it in the URI) -- Prefbar lets you just click to change pipelining back and forth, so you can turn it on for sites that it helps and turn it off for sites that it causes problems with. It also provides easy access to change the UA string, if you have to deal with web sites that aren't configured properly (for example any Microsoft .NET website with a default machine.config/web.config file that also uses CSS)

Posted by: Dave Bacher on December 30, 2004 01:56 PM

Is there any setting similar to
which adjust how many concurrent TCP sockets can be open at the same time?

I have a feeling this depends on the OS's network stack, but worth asking..

Posted by: Jeremy Dunck on December 30, 2004 03:34 PM

"When you leave out decent DOM support, access to dynamic attributes, and out other "modern" browser features"
Can you provide more info on these? Epecially what are those unsupported "modern" browser features? (having built-in troll with FUD support?)

Posted by: porneL on December 30, 2004 04:14 PM

I too have serious slowdowns with the new Adobe Acrobat reader plugins.
My cure?
Turn off browser integration in the Acrobat preferences. This doesn't make .pdf's load any faster, but your browser won't lock up and the .pdf opens in a new Acrobat (not browser) window.
Not a cure, but I find it to be a usable workaround.

Posted by: AJ on December 30, 2004 05:01 PM

I am using Firefox 1.0 and Thunderbird. I loves it very much and I appreciate the hard works contributed by Mozilla team. FYI, I was a IE and outlook user for like 4 years; And I constantly looking for a new web browser and web client that I can trust, and that's FF and TB.

Posted by: HoneyNET on December 30, 2004 06:27 PM

Thanks for the tip. Now I've considered changing the settings back. I changed the three values back to their defaults ("false" "4" "false" correct?) but I don't know what to do with the newly inputted "nglayout.initialpaint.delay" that was referenced. Is there a way to delete it, or do I just reset it and leave it?

Posted by: night524 on December 30, 2004 08:24 PM

To speed up PDFs, you can speed up the initial loading of Acrobat reader by shutting off many of the plugins it loads; many of these plugins are probably pretty useless for you (do you use a screen reader to pronounce the text of a PDF?).
You can shut off these plugins by using Adobe Reader SpeedUp:
which will let you selectively switch them back on as well.
It really does speed up that initial load!

Posted by: quickPDF on December 31, 2004 12:52 AM

Is there a corresponding way to speedup downloads, especially multiple downloads? Firefox starts out at some fairly impressive download speeds, but the download speed drops off rather rapidly, especially if there are multiple downloads in progress. Also, Firefox does not appear to cache the download the way that Mozilla does (which begins the download when you click on it and continues even while setting the target of the download so that when you click on the final target file it has already been downloading for however long). Firefox also is rather slow in resuming download speed when one download finishes and more bandwidth is freed up.

Posted by: Richard on December 31, 2004 09:41 AM

Yup, have to say, after doing the tweak with an app I saw posted, while it may load faster, I found a page that isn't displaying correctly, and confirmed it works ok in IE and an untweaked Firefox. And using the app's "remove" option didn't fix it. Poo.

Posted by: David on December 31, 2004 10:38 AM

Hi all, I have tried the tweak and have noticed a very fast initial load up; however, after that it takes up to 6-7 seconds before I can actually click on anything. I then decided to change back to the defaults but the same problem still persists. Do you have any suggestion regarding to this issue? Thanks for your help in advance.

Posted by: Joseph on January 1, 2005 04:12 PM

Hi Asa,
-Something related to this topic.
-Is there any way to make the browser just concentrate on loading the HTML completely and displaying it before starting to download the images and others?
-This will help greatly whereever browsing sites such as YahooMail when you are not interested in the images like icons etc that you have already seen and know of. You can see the text and start clicking on the links right away without having to wait for.
-Thanks in advance. Regards.

Posted by: BBN on January 2, 2005 05:23 AM

I'm trying to restore firefox to it's default settings, but I can't remove the line "nglayout.initialpaint.delay". Any thoughts? Starburst

Posted by: starburst on January 2, 2005 07:07 AM

As a relatively unsavvy FF user, I want to thank everyone for the ideas here. I especially like the (now obvious) idea of cutting off Acrobat integration. I'll do anything to keep the FF window up and moving; when I'm loading a PDF I want access to my ten other FF tabs.

Also, to anyone trying to start a browser pissing contest, remember, this isn't slashdot.

Posted by: Nick Douglas on January 3, 2005 12:01 AM

BBN said:

"Is there any way to make the browser just concentrate on loading the HTML completely and displaying it before starting to download the images and others?"

Opera does something similar to this. It displays the HTML as soon as it can, even before the CSS styling, JS or images comes in. However, Firefox devs consider this to be a bug, as the claim is that some JS may need to reference a displayed style, yet that style has not yet been applied and thus breaks. This has not been demonstrated in a live test-case yet, so only remains a theoretical weakness AFAIK.

Some others also dislike the effect, which causes the famous flash of unstyled content (FOUC). I thus doubt Firefox rendering will do anything similar (in Opera this behaviour can be easily controlled using their version of nglayout.initialpaint.delay though).

Posted by: Ian on January 3, 2005 12:54 AM

BBN said:

"Is there any way to make the browser just concentrate on loading the HTML completely and displaying it before starting to download the images and others?"

For sites like Yahoo mail and search engines you can right click on an image and click "Block images from (image server name)" Saves a lot of time with useless ads

Posted by: Max on January 4, 2005 05:38 AM

Operas lightning fast back/forward speeds is the only reason i use it instead of FF. I like FF and all, but once you get used to operas speed, its addicting. I really dont see any big differences, both are highly customizable. I guess my only beef with opera is that it dosent support active-x, so i cant check my gmail, but i dont even use it that much.

Posted by: Steve on January 4, 2005 06:16 PM

And how about optimizing start-up time for first instance of FF?

IMHO it's a single most annoying thing about FF...all other browsers are a way faster on booting up and loading first page....I still keep IE as default browser so that I don't have to wait ages each time I need to take a look at some html file...

I haven't check code, so I've got no idea how FF boot up works, but if it really (as I suspect) parses all configuration and extensions code each time it starts it's such a waste of time...

Is there some technic to cache or at least preload parts of FF so that it loads faster?

Posted by: ivanhoe on January 6, 2005 04:12 AM

Starburst wrote: ... I can't remove the line "nglayout.initialpaint.delay".

Right-click, and select "Reset". Quit and restart FF.

Posted by: Neil Mayhew on January 7, 2005 01:20 PM

I've got all kinds of Firefox tips here:

I put together a user.js file that is commented based on things I've read over on Mozillazine.

Posted by: Scott on January 8, 2005 12:20 AM

If you like speed and don't mind a little bit of fiddling around to customize things, it is worth checking out another Mozilla-based browser, K-Meleon:

I use the Wechselbalg build -- newer than the "official" release, more reliable than a beta.

Posted by: Kitty on January 8, 2005 07:14 AM

I'm still using Mozilla 1.74. Just one feature is keeping me here instead of using Firefox. I'm constantly opening new windows using the small "Open new tab" button on the left side of the tabs bar. I prefer this to ctrl-T and to File>NewTab. Is that button hidden in Firefox with a switch I can set?

Posted by: bobW on January 8, 2005 01:40 PM

bobW, Yes You can! Just add item "open new tab" to your toolbar, OR just press your mouese scroll when over a hyperlink.

Posted by: quartz on January 9, 2005 03:36 PM

Would it be a way for the browser to verify each page viewed to know if pipelining would be useful or not and than automaticly making the choice of using it or not for each page or each server requested?

Posted by: sebast on January 15, 2005 08:47 PM

BobW: There is an extension for Firefox called 'Tabbrowser Preferences' wich will do the trick.

Posted by: ikkejw on January 16, 2005 04:28 AM

Post a comment