I’ve just read a great tip on Firefox performance by Nick Anderson that I wanted to share with you: Newer versions of Firefox store all its data in so-called SQLite databases. SQLite is an ACID compliant relational database engine that consists of one flat file and is meant for storing data of single-user applications. The problem with these SQLite database files is that they get cluttered over time. Luckily, there’s a statement to clean up an SQLite database: The VACUUM statement. Just close all Firefox instances, backup your profile and run the following shell code:
for i in ~/.mozilla/firefox/*/*.sqlite; do sqlite3 $i VACUUM;done;
VoilĂ . Depending on how long you use your profile, the performance increase will be really significant. And don’t think of filing a bug report. There are already plenty of it.
Update: Jeremy Orem recently posted on how you can clean your SQLite databases without shutting down the browser:
- Select Error Console from the Tools menu.
- Paste the following in the Code text-box:
Components.classes["@mozilla.org/browser/nav-history-service;1"].getService(Components.interfaces.nsPIPlacesDatabase).DBConnection.executeSimpleSQL("VACUUM") - Press Enter
The user interface may freeze for a second while the vacuuming takes place.
Tags: Firefox, performance, SQL, SQLite
Shameless plug: If this post was useful to you, please consider buying yourself something from one of my Amazon stores: US store, UK store, FR store, DE store, CA store. If you're not into Amazon, why not donate something to GNOME, Mozilla or Wikipedia? Thank you!


