Ubuntu / Linux news and application reviews.

A few months ago, I posted how to improve Firefox performance by defragmenting its database files executing SQLite VACUUM command (for Windows, Linux and MacOSX). The only con was that it required a Firefox restart to execute the command.


Thanks to Mozilla’s Jeremy Orem, we have now learned it can be done from within Firefox in 3 short steps:

firefox sql database optimize

1. Open the Error Console: Tools menu/Error Console
2. In the Code text box paste this (it’s a single line):
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.

Also, there is a new experimental Firefox addon which makes this process more comfortable by providing the means to run the database optimization with a single click. The will optimize the SQLite databases of the active Firefox profile whenever its button in the Firefox status bar is pressed.

vacuum places firefox addon

Vacuum Places can be downloaded from HERE. It is advised to create a backup of the Firefox profile folder before running it for the first time.

[via ghacks & mozilla links]