7

The Firefox Awesome Bar is indeed awesome. But, lately I see that it has become slow. On entering some characters it even freezes for a few seconds (freezing the entire browser).

Why does it slow down? Is there a way to speed it up?

(The OS is Windows XP.)

3
  • I can't find a reference to it now, but I remember reading on one of the mozilla devs blogs that they were looking into this.
    – Sam Hasler
    Jul 16, 2009 at 11:27
  • Yep, Firefox 3.7 should be a bit faster when it comes out. mashable.com/2009/06/29/firefox-next Jul 27, 2009 at 22:08
  • What add-ons do you have installed? I'm having the same issue on my home desktop and it even seems to lose keystrokes consistently. I'm wondering if it could be related to a particular add-on. Sep 9, 2009 at 13:32

8 Answers 8

10

You could VACUUM the SQLite databases that Firefox uses to store it's history and other data. Vacuuming optimizes the database tables inside the files. That speeds up Firefox and saves you some disk space.

To vacuum the Firefox database files:

  1. Find the Firefox profile data directory on your system. On Windows Vista, it could be somewhere like C:\Users\tom\AppData\Roaming\Mozilla\Firefox\Profiles\default.jqi\. The directory contains files with the .sqlite extension, so you can find it by searching for those.

  2. Get the SQLite command line utility here.

  3. Close all Firefox windows. Open a command line in the profile directory.

  4. On Windows, type in the command for %i in (*.sqlite) do @echo VACUUM; | sqlite3 %i On Linux or Mac, run for i in *.sqlite; do echo "VACUUM;" | sqlite3 $i ; done

  5. Defragment your harddrive.

Google Chrome actually uses SQLite as well, except it doesn't give the files the .sqlite extension. You can still safely run the same command for all the files in the Chrome profile directory and SQLite will only VACUUM the files it recognizes.

3
  • On a Mac: ~/Library/Application\ Support/Firefox/Profiles/*.default/ (see superuser.com/questions/3275/firefox-on-mac-slow-slow-slow/…)
    – Arjan
    Aug 18, 2009 at 9:17
  • Is there any reason you're putting VACUUM in both bold and all-uppercase?
    – Hello71
    Mar 14, 2011 at 15:56
  • @Hello71: nope. I'm just used to writing SQL keywords in uppercase for better readability. Lowercase should work fine. Mar 15, 2011 at 9:40
2

It is easier to install the Vacuum Places addon which allows you to defragment the Places database with the click of a button.

You used to be able to run the command:

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

in the "Error Console" to vacuum the database, but I'm not sure it works in Firefox 3.6.

1

This is because you have a lot of pages history. Clearing history every once in a while helps with this.

1
  • 6
    Doesn’t that somewhat diminish the awesomeness of the awesome bar. Jul 16, 2009 at 11:21
1

Well the awesome bar queries your history, bookmarks and recent search terms (from the same bar) so perhaps you've got a lot of data in there. Try clearing out your history (from a month back onwards if you'd like to keep recent history) and emptying your search history - 3.5 has a useful tool for this (that can clear up to a set date). This should speed up your query times if there's less data.

1

The Places Maintenance extension has a UI that allows easy vacuuming (optimization) of Firefox database files, which should help speed up the Awesome Bar and other Firefox database access. It also has other Firefox database maintenance functions:

Allows to run Maintenance tasks on the database that drives Places, the bookmarks and history module behind Firefox.

Places Maintenance UI

0

On Linux you could use tmpfs to mount part of the filesystem in memory. (Ironically, of course, one of SQLite's best features is its ability to store an entire database in memory in the first place.)

Wikipedia suggests an alternative to tmpfs for Windows, but it doesn't go into details and it feels somewhat hacky. YMMV.

0

This works just fine for me:

cd ~/.mozilla/firefox/????????.default
echo "VACUUM;" | sqlite3 places.sqlite

The idea is VACUUMing, as suggested, only places.sqlite.

0

If you have SQLite you can run this command:

echo 'DELETE FROM moz_historyvisits
WHERE visit_date < strftime("%s", "now", "-5 month") * 1000000; VACUUM;' |
sqlite3 places.sqlite

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .