Speedup Firefox with VACUUM

I’ve seen a few posts about VACUUMing Firefox’s sqlite database for better performance, but each requires Firefox to be shut down.

Here is a way to VACUUM your places database from within the browser.

  1. Go to Tools -> Error Console
  2. Paste the following in the “Code:” text-box: Components.classes["@mozilla.org/browser/nav-history-service;1"].getService(Components.interfaces.nsPIPlacesDatabase).DBConnection.executeSimpleSQL("VACUUM");
  3. Press Enter

Your UI will freeze for a bit while the vacuum runs.

Resources:

Cross post from my personal blog.