// you’re reading...

How in the Tech

Vacuum Firefox each time you vacuum your house to maintain performance

Firefox 3.0′s Awesome Bar brought about many exciting and useful features. The address bar on steroids provided an interface to search your bookmarks, browser history, or even the Internet at large. URLs, page titles, bookmark tags; it doesn’t matter as the Awesome Bar is still able to deduce and provide just what you are looking for. It’s quite handy once you’ve adapted to the tweak on your browsing habits.

Unfortunately, not everything was awesome from it’s introduction. Firefox stores all of the extraneous information that the Awesome Bar leverages in an SQLite database. Typically, databases are extremely flexible, fast, and efficient when it comes to organizing and maintaining sets of data. However, through prolonged use, the database can become fragmented as data comes and goes – just like your hard drive becomes fragmented over time. Traditional databases have a process or procedure called vacuuming to address the fragmentation issue. Firefox shares the same concept but it is not at all logical or intuitive.

Before I detail how to go about this process, what would a symptom be of a highly fragmented SQLite Firefox database? The one that occurs most often, in that I’ve seen it myself on a number of installs, is the freezing of the browser when you begin typing in the Awesome Bar. As the search results are drilled down as you type, the browser lurches upon the initiation of the search. It quickly becomes extremely frustrating and undermines everything that is great about the Awesome Bar. Sound familiar? If so, here’s what you can do.

  1. In Firefox, open the Error Console from the Tools menu. It can also be kick-started with the keyboard shortcut CTRL+SHIFT+J.
  2. Within the Code field copy and paste this function call exactly:
    • Components.classes["@mozilla.org/browser/nav-history-service;1"].getService(Components.interfaces.nsPIPlacesDatabase).DBConnection.executeSimpleSQL(“VACUUM”);
  3. Now click Evaluate. The Firefox UI will freeze momentarily as the vacuum process runs – not unlike the symptom you are trying to address above!
  4. firefox-error-console-vacuum

  5. You will not receive any visual feedback that the command did anything, but it shouldn’t be difficult to notice the performance improvements brought about by your handy work.

Now admittedly, this is a pretty geeky procedure to go through each time your performance begins to dip. Thankfully, I’m going to leave you with another option. Vacuum Places Improved is a Firefox extension that can handle the vacuuming process itself with a few simple clicks. Even better, Vacuum Places Improved allows the process to be scheduled to automatically run after a configurable amount of Firefox start-ups.

vacuum-places-improved

Related Posts with Thumbnails

Discussion

No comments for “Vacuum Firefox each time you vacuum your house to maintain performance”

Post a comment