Some Firefox About:Config Performance Suggestions
After reading "JavaScript speedups in Firefox 3.6" by Alix Franquet, which mentions the JIT for browser UI JavaScript about:config variable named javascript.options.jit.chrome, which was available in Firefox 3.5 and I didn't know it, I finally decided to review all of the Firefox about:config variables and find out what they all were. After I did so I found quite a few settings that if changed from their default settings would make Firefox even faster. These are the settings I want to go over in this article.
To start off with, I would recommend that you install Firefox 3.6 RC2 or higher, because if you read the article I mention above, then you will know why Firefox 3.6 is so much faster than 3.5 is.
About:Config Settings
I'm not going to list every about:config setting, only the ones that I think if changed should improve Firefox's performance.
Browser.cache.disk.capacity
browser.cache.disk.capacity is set to about ~50000KB by default, and slightly more or less for different systems. This setting determines the maximum amount of hard drive (HD) space that can be used for caching purposes.
This setting obviously depends on how much HD space you have, and how often the cache would be of use to you, but if you are like me, the cache can save tons of time, and there is 150+GB of free space on my C drive usually so I would suggest cranking this value up to something like 500000 to 1000000 or even higher.
Browser.sessionhistory.max_total_viewers
browser.sessionhistory.max_total_viewers is set to -1 by default. This setting is used to determine how much memory can be consumed in order to save previously viewed pages post-parse. The value -1 means Firefox can automatically determine the maximum amount of pages to store in memory.
For those of you that do not have a problem with how much memory Firefox is consuming on your system -1 should be fine, for the rest of you, consult this page on browser.sessionhistory.max_total_viewers to find out how to set your own limit. I suggest a value of 1 to 3 depending on how often you use the back/forward buttons, and how much you care about saving time re-parsing pages over limiting Firefox's memory consumption. One page will on average take 4MB of memory.
Browser.urlbar.default.behavior
browser.urlbar.default.behavior is 0 by default. This setting defines filters which can be applied to the search behavior of the location bar in Firefox 3.5+, the default setting, 0, means that no filters are applied.
By applying filters to the search functionality of the location bar you can decrease the search request times, and indexing time, if there is any indexing done. So I suggest you add a filter that makes sense for you. Read up on browser.urlbar.default.behavior for more information.
Dom.max_chrome_script_run_time
dom.max_chrome_script_run_time is 20secs by default. This setting defines the amount of time allowed to elapse before long-running scripts in Firefox's chrome will be aborted.
This setting will not improve your system's performance, but setting it lower will give you information about which chrome scripts are taking the most time to execute, if you are interested in that.
Dom.max_script_run_time
dom.max_script_run_time is 5secs by default. This setting defines the amount of time allowed to elapse before long-running scripts in web pages will be aborted.
This setting will not improve your system's performance, but setting it lower will give you information about what web page scripts are taking the most time to execute, if you are interested in that.
Image.animation_mode
image.animation_mode is set to normal by default, which allows animated gifs to play over and over.
If you set image.animation_mode to none then this will prevent image animation.
Javascript.options.mem.gc_frequency
javascript.options.mem.gc_frequency is 1600% trigger factor by default. I'm not sure exactly what this is, but if you read this article then you will see that while the peak memory consumption goes up as the trigger factor goes up, the number of times the garbage collection is executed goes down.
I suggest setting javascript.options.mem.gc_frequency to 3200 to reduce the number of times that the garbage collection is executed because as of Firefox 3.6 memory is freed in a separate thread, so pause time should not be affected much. I suggest you read the article I mention above though and think about what is more important to you, the number of times the GC is executed, or peak memory usage.
Javascript.options.relimit
javascript.options.relimit is false by default. If this setting is set to true then JavaScript regular expressions that backtrack more than n³ times will throw an exception, where n is the length of the string.
This won't really make your system any faster by itself, and will possibly break something that you don't wish it to, so be cautious if you decide to enable this setting. Enabling this will let you know what regular expressions are reaching more than n³ bracktracks however, if you care about that sort of thing.
Layout.css.report_errors
layout.css.report_errors is true by default, which means that css errors will be sent to the JavaScript Console.
I'm a web developer and I don't want this enabled on my main surfing profile, I always have a developer profile setup for Firefox on my machines. So I suggest setting layout.css.report_errors to false and enabling it again if you ever need it, this will save the time it takes to send css errors to the JavaScript Console.
Layout.reflow.timeslice
layout.reflow.timeslice is 1000000 by default, where 1000000=1sec. This setting does not exist by default, but if used then this setting will allow you to change the maximum number of microseconds to spend on an asynchronous reflow.
I changed this value to 650000 or 0.65 seconds, a little more than half of the default, 1 sec. I did this because I hate pages that make me wait near a second or more to handle reflows, so I want those reflows to be broken up even more.
Layout.scrollbar.side
layout.scrollbar.side is set to 0 by default. This setting will change the logic used to decide on which side (left or right) should scroll bars be placed. The default, 0, means place the scrollbar at the end (right in LTR languages, left in RTL) of the content, based on the UI's direction.
The better setting I think is 2 or 3, which places scroll bars on one side every time without any thinking, use 2 for the right side and 3 for the left side.
Network.cookie.cookieBehavior
network.cookie.cookieBehavior is 0 by default, which means that all cookies are allowed.
I suggest you set network.cookie.cookieBehavior to 1 which means that only cookeis from the originating server are allowed.
Network.http.keep-alive.timeout
network.http.keep-alive.timeout is 115 secs by default. This preference determines how long keep-alive connections are kept alive.
I suggest setting network.http.keep-alive.timeout higher, to 400 or more.
Network.http.max-connections
network.http.max-connections is 30 by default. The total number of HTTP connections Firefox can make is limited by this setting.
I suggest raising this value to 60 or higher.
Network.http.max-connections-per-server
network.http.max-connections-per-server is 15 by default. The total number of HTTP connections Firefox can make to a single server is limited by this preference.
I suggest raising this value to 25.
Network.http.max-persistent-connections-per-server
network.http.max-persistent-connections-per-server is 6 by default. The total number of HTTP keep-alive connections Firefox can make to a single server is limited by this preference.
I suggest raising this value to 9.
Network.http.pipelining
network.http.pipelining is false by default. If a proxy server is not configured, then this setting will control whether multiple requests can be sent before any response is received, this is known as piplining.
Set network.http.pipelining to true and do the same for network.http.proxy.pipelining if you want it enabled when using a proxy server.
Network.http.pipelining.maxrequests
network.http.pipelining.maxrequests is 4 by default. This setting specifies the maximum number of requests to pipeline at once.
Set network.http.pipelining.maxrequests higher, to like 10 or more.
Network.http.redirection-limit
network.http.redirection-limit is 20 by default. This setting defines the maximum number of redirects that can be followed per request.
Most requests with a redirect will range from 1 to 4 at the very most, so I set this setting to 5 personally, because anything more than than is either a loop (and I want to stop those as soon as possible) or it is something I probably want to know about.
Network.http.request.max-start-delay
network.http.request.max-start-delay is 10 seconds by default. This preference controls that amount of time before a maximum number of connections is exceeded.
I suggest setting this to 1 second.
Network.prefetch-next
network.prefetch-next is true by default. When this setting is set to true Firefox will scan the pages you view for hints that certain other pages are likely to be visited, and pre download them for you before you request them, even though you may not.
If you want to know more about prefetching, see the link prefetching faq. My suggestion is set network.prefetch-next to false, but this depends a lot on what sites you typically use and how you use them, so think about this one. Even if you would prefer prefetching, disabling this feature will save the time it takes to parse each document for prefetch links.
Nglayout.enable_drag_images
nglayout.enable_drag_images is true by default. This setting will enable or disable the translucent "drag feedback" image that is shown to you when you drag elements in Mozilla's UI.
If you disable features which you do not need then Firefox will be faster, so set nglayout.enable_drag_images to false.
Nglayout.initialpaint.delay
nglayout.initialpaint.delay is 250 milliseconds by default. Lower values will make a page initially display more quickly, but will make the page take longer to finish rendering. Higher values will have the opposite effect.
My suggestion here is to set nglayout.initialpaint.delay higher if you are like me, and don't care much about the initial load time, and more about the overall render time. I'm using 450 milliseconds at the moment.
Security.enable_java
security.enable_java is set to true by default, which means java is enabled.
Most sites don't use java these days, and there are a number of addons that allow you to disable/enable java quickly, so I suggest leaving java disabled by default. So set security.enable_java to false.

@erikvold