Performance

Improving Firefox's performance is divided into parameters that can be inputted while running Firefox or otherwise modifying its configuration as intended by the developers, and advanced procedures that involve foreign programs or scripts.

Tunables

Network settings

Values for connections (HTTP, proxy, etc.) should be tweaked based on connection.

These are the values for a 1.5Mb cable connection:

Key

Value

Description

network.http.pipelining

true

enable pipelining for normal connections

network.http.proxy.pipelining

true

enable pipelining for proxy connections

network.http.pipelining.firstrequests

true

enable pipelining of first requests

network.http.pipelining.maxrequests

8

maximum HTTP requests per pipeline

content.notify.backoffcount

5

number of initial reflows during rendering

content.interrupt.parsing

true

enable interruption of parsing to return to the application's event loop

content.max.tokenizing.time

2250000

time after which parsing is interrupted

content.notify.interval

750000

time steps for the initial reflows (content.notify.backoffcount)

content.notify.ontimer

true

enable timer based reflows

content.switch.threshold

750000

keep same as content.notify.interval

nglayout.initialpaint.delay

0

time before inital page reflow

network.http.max-connections

48

number of total HTTP connections

network.http.max-connections-per-server

24

maximum number of any type of connections per server

network.http.max-persistent-connections-per-proxy

16

maximum number of keep-alive type connections per proxy

network.http.max-persistent-connections-per-server

8

maximum number of keep-alive type connections per server

browser.cache.memory.capacity

65536

size of memory to use as cache - set as big as you can for normal operation

network.dns.disableIPv6

true

disables IPv6 support - may not work for all networks, some report speed increase

Turning off anti-phishing

Note: Deleting files from your profile folder is potentially dangerous, so it's recommended that you make a backup of the folder first.

The anti-phishing features of Firefox may cause Firefox to become slow to start or exit, and might also affect the browsing speed since Firefox apparently contacts google for every http request. The problem is that Firefox maintains a sqlite database that might grow quite big, and reading and writing to this database begins to take some time when it grows bigger. If you feel that you don't need Firefox to tell you which sites may be suspect you can disable this feature:

Turn off the following options under the security tab in preferences: "Tell me if the site I'm visiting is a suspected Attack site" and "Tell me if the site I'm visiting is a suspected forgery".

Delete all files beginning with urlclassifier in your profile folder (~/.mozilla/firefox/********.default where ******** is some combination of letters and numbers. Default might be something else if you have created a non-default profile). Some of these files might be recreated by Firefox, but they won't grow any larger than their initial size:

$ rm -i ~/.mozilla/firefox/*.default/urlclassifier*

Improve rendering by disabling pango

Note: Exporting the setting may also fix font issues for the entire Mozilla suite.

Defragment the profile's SQLite databases

Warning: This procedure may damage the databases in such a way that sessions are not saved properly.

Sample size differences comparison

SQLite DB

Size Before

Size After

% change

urlclassifier3.sqlite

37 M

30 M

19 %

places.sqlite

16 M

2.4 M

85 %

Profile defragmentation procedure

Firefox 3.0, bookmarks, history, passwords are kept in SQLite databases. SQLite databases become fragmented over time and empty spaces appear all around. But, since there are no managing processes checking and optimizing the database, these factors eventually result in a performance hit. A good way to improve startup and some other bookmarks and history related tasks is to defragment and trim unused space from these databases.

Appearance

Fonts

DPI

Modifying the following value can help improve the way fonts looks in Firefox if the system's DPI is below 96. Firefox, by default, uses 96 and only uses the system's DPI if it is a higher value. To force the system's DPI regardless of its value, type about:config into the address bar and search for layout.css.dpi. Change it to 0.

Default font settings from MS Windows

Below are the default font preferences when Firefox is installed in Microsoft Windows. Many web sites use the Microsoft fonts.

Miscellaneous

Viewing PDF/PS inside Firefox

if you don't want for some reason install Adobe Acrobat Reader for exploiting the feature to see PDF inside Firefox, you can use other software, like Evince (default viewer in GNOME)

for example if you want to use evince for opening a pdf/ps or any other document supported by evince, inside firefox, and not to open a new window, this is possible and you just follow this simple instructions: