When Firefox starts up sooo slowly.

This post was written by eli on March 6, 2010
Posted Under: Software

A short note, since it’s so simple and so important. When Firefox gets painfully slow, just compact its Sqlite databases. As has been pointed out elsewhere, the quick fix is to close Firefox, go to where it holds its files, find the .sqlite files, and go (bash under Cygwin, in my case):

$ for i in *.sqlite; do echo "VACUUM;" | sqlite3 $i ; done

And it helps a lot. It’s not just the files getting smaller. It’s everything getting faster.

The sqlite binary for Windows can be found here.

There is a Firefox plugin for this and a standalone application, but I like it in good-old command line with my full control on what’s happening.

Reader Comments

You can actually run the vacuum command from inside Firefox. Just type the following command into Firefox error console –

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

Please note that this is not required for the recent Firefox release, as it does it automatically when needed.

#1 
Written By Tomer on March 6th, 2010 @ 15:16

or use bleachbit, does the same for chrome and others :)

#2 
Written By vespas on March 18th, 2010 @ 21:17

Add a Comment

required, use real name
required, will not be published
optional, your blog address