July 15, 2008

Firefox 3 history database speed

Of the few things I dis­like about Fire­fox 3, the his­to­ry man­ag­er (Places Library) is the worst. The UI fre­quent­ly paus­es for sec­onds at a time when mov­ing up and down the list, delet­ing mul­ti­ple entries from the data­base is painful­ly slow and there’s no progress bar. If an action blocks the UI for long enough a dia­log appears ask­ing whether you want to kill the cur­rent script (includ­ing an inter­nal path­name and line num­ber!). It’s not user-friend­ly and I don’t have a clue what state that’d leave the app in, so I hes­i­tate to do it.

I had a hunch that the Places data­base was respon­si­ble for at least part of the slow­ness, along with my slow start-up times and occa­sion­al UI paus­es when typ­ing in the address bar. So I went in search of a way to opti­mise the DB or fail­ing that cir­cum­vent the Library UI and remove rows manually.

I ran over a com­ment by ‘olaf675’ about using the SQLite Man­ag­er addon for FF3 to Com­pact the Places data­base. This worked a charm, reduc­ing my places.sqlite file from 26MB to 13MB with no appar­ent issues after two restarts. This took about ~10 sec­onds of processing.

I stepped into the Library again and removed ran­dom crap from his­to­ry such as any­thing end­ing in .jpg, Flickr pho­to pages (flickr.com/photos) and Google search­es (google.com/search). This totaled just over 6000 entries. Then any­thing over 4 months old bit the dust (~1250). At this point remov­ing large num­bers of entries was a lot faster. The Library is still not hang-free but it’s a real improve­ment. Hope­ful­ly the Places UI work in FF3.1 will reduce freezes and pro­vide progress feedback.

posted by Andrew

One thought on “Firefox 3 history database speed

Leave a Reply

Your email address will not be published. Required fields are marked *