July 15, 2008
Firefox 3 history database speed
Of the few things I dislike about Firefox 3, the history manager (Places Library) is the worst. The UI frequently pauses for seconds at a time when moving up and down the list, deleting multiple entries from the database is painfully slow and there’s no progress bar. If an action blocks the UI for long enough a dialog appears asking whether you want to kill the current script (including an internal pathname and line number!). It’s not user-friendly and I don’t have a clue what state that’d leave the app in, so I hesitate to do it.
I had a hunch that the Places database was responsible for at least part of the slowness, along with my slow start-up times and occasional UI pauses when typing in the address bar. So I went in search of a way to optimise the DB or failing that circumvent the Library UI and remove rows manually.
I ran over a comment by ‘olaf675’ about using the SQLite Manager addon for FF3 to Compact the Places database. This worked a charm, reducing my places.sqlite file from 26MB to 13MB with no apparent issues after two restarts. This took about ~10 seconds of processing.
I stepped into the Library again and removed random crap from history such as anything ending in .jpg, Flickr photo pages (flickr.com/photos) and Google searches (google.com/search). This totaled just over 6000 entries. Then anything over 4 months old bit the dust (~1250). At this point removing large numbers of entries was a lot faster. The Library is still not hang-free but it’s a real improvement. Hopefully the Places UI work in FF3.1 will reduce freezes and provide progress feedback.
One thought on “Firefox 3 history database speed”