• RSS
  • subscribe
  • twitter

Optimize Firefox Databases With a Single Line of Code and Vacuum Places Add-on

In Firefox 3 Bookmarks and browsing History are stored in SQLite databases. Like any other database, the SQLite databases get fragmented with time, added to that, your default history time span in Firefox 3.5 was increased from 9 to 90 days. These increase the possibility of having a bloated and cumbersome database which subsequently leads to a performance hit; slow access times -- that nobody wants.

Vacuum’ing can significantly reduce loading time of the browser. You can Vacuum using a single line of code in three steps.
1) Open the Error Console: Tools menu/Error Console
2) In the Code text box paste the following code:
Components.classes["@mozilla.org/browser/nav-history-service;1"].getService(Components.interfaces.nsPIPlacesDatabase).DBConnection.executeSimpleSQL("VACUUM");
3) Press Evaluate. All the UI will freeze for a few seconds while databases are VACUUMed. No restarts.

The procedure of optimizing your Places database can also be carried-out with a new experimental Firefox add-on called Vacuum Places. This firefox extension will optimize your current Firefox profile whenever you hit the “Vacuum your Place database now” button in Firefox status bar.

via [Mozilla Links]