Speed Up Firefox by Vacuuming SQLite Database

By | August 27, 2009 | 4 Comments


Speed Up Firefox by Vacuuming SQLite DatabaseJeremy Orem has posted an interesting tip on how to speed up Firefox web browser.

All you have to do is paste the following command (as single line) to your console bar (can be accessed via tools > error console):

Components.classes["@mozilla.org/browser/nav-history-service;1"].getService
(Components.interfaces.nsPIPlacesDatabase).DBConnection.executeSimpleSQL(“VACUUM”);

And hit enter (user interface might freeze for a moment).

As he says, it will vacuum Firefox’s sqllite database which will lead to better browser performance.

Via FirefoxFacts


About (Author Profile)


Vygantas is a former web designer whose projects are used by companies such as AMD, NVIDIA and departed Westood Studios. Being passionate about software, Vygantas began his journalism career back in 2007 when he founded FavBrowser.com. Having said that, he is also an adrenaline junkie who enjoys good books, fitness activities and Forex trading.

  • Foo

    Via Mozilla Links you can find the bug on this and an extension that’ll give you a bit of UI (a statusbar icon) to help.
    Also, Luca Niccoli made his own version of REVERTRONs extension:
    https://addons.mozilla.org/en-US/firefox/addon/13878

    Btw, the quotation marks around VACUUM are of the wrong type causing an error, it should be like this:

    Components.classes["@mozilla.org/browser/nav-history-service;1"].getService(Components.interfaces.nsPIPlacesDatabase).DBConnection.executeSimpleSQL(“VACUUM”);

    • Foo

      … or not, stupid WordPress autoformating -_-
      Strange though that the first two quotes manage to get away unharmed.
      Let’s try single quotes then:

      Components.classes['@mozilla.org/browser/nav-history-service;1'].getService(Components.interfaces.nsPIPlacesDatabase).DBConnection.executeSimpleSQL(‘VACUUM’);

  • Pete

    As posted on the Mozilla Wiki, this functionality will be integrated into Firefox 3.6

    https://wiki.mozilla.org/Firefox/Projects/Places_Vacuum