Speeding up Firefox on OSX

Firefox had been running really slowly lately and as I am an awful hoarder of tabs closing the application took forever. I’d heard that since version 3 there was a sql lite table that according to Google could do with vacuuming – whatever that meant.

The SQLite database uses flat files for local storage and I wondered how big and bloated they had become over time. It turned out to be much worse than I expected. To view I typed the following into a command terminal
find ~/Library/Application\ Support/Firefox/Profiles -type f -name '*.sqlite' -exec ls -arlth {} \;
My .places file was 40 megabytes which certainly wasn’t helping speed at all. The following command took care of the necessary housekeeping
find ~/Library/Application\ Support/Firefox/Profiles -type f -name '*.sqlite' -exec sqlite3 {} VACUUM \;
find ~/Library/Application\ Support/Firefox/Profiles -type f -name '*.sqlite' -exec sqlite3 {} REINDEX \;