This have bothered me from time to to me over the last years, and now it happened again. And this time I thought I could write down the quick fix (for lilnux, probably works with Macs too)
- stop Firefox
- cd into your firefox profile
- for i in `find . -iname \*sqlite`; do echo " -- $i --"; ls -l $i; sqlite3 $i VACUUM; ls -l $i ; echo; done
This reduced places.sqlite from 21 to 3MB, cookies.sqllite almost halved in size, while some of Firefox's own db's remained unchanged.
And most importantly - Firefox feels a lot quicker now:-)