Just found this and thought i had to share it:
Firefox insists on doing huge amounts of I/O when closing, as well as act slow when using the awesomebar, try the following (close down Firefox completely first):
for f in ~/.mozilla/firefox/*/*.sqlite; do sqlite3 $f ‘VACUUM;’; done
It’s harmless, no data will be lost: it compacts your SQLite databases. Noticable gains for me.