how to optimize firefox 3.5 using database vacuum method
the following short steps are meant for linux based firefox only, for windows based you might want to google to find out.
pre-requisites:
- you must have sqlite version 3 installed, do the following if you don't have it installed:
$ sudo apt-get install sqlite3
steps:
- create a file using your favorite editor, generally a vi should be good enough. i use the filename as "firefox-3.5-optimize", ensure the file is executable afterwards by issuing command:
$ chmod +x firefox-3.5-optimize
- paste the following lines into the file:
#!/bin/bash
killall firefox-3.5
ls -l $HOME/.mozilla/firefox-3.5/y6boq3kl.default/*.sqlite
find $HOME/.mozilla/firefox-3.5/y6boq3kl.default/ \( -name "*.sqlite" \) -exec sqlite3 {} "vacuum" \;
ls -l $HOME/.mozilla/firefox-3.5/y6boq3kl.default/*.sqlite
the codes above will first kill all running firefox 3.5 instance, then it will list down all sqlite files under your profile (here mine is y6boq3kl.default change yours where applicable. next it will loop every sqlite file and perform the vacuum actions. later it will list those files again, you can measure their changes by each file's size.
- after the execution completed, use the following command to ensure no leftover instance in memory before launch the browser
$ ps -eaf | grep firefox
if you don't see firefox-3.5-optmize running then its safe to close the terminal and launch the browser.
![Reblog this post [with Zemanta]](http://img.zemanta.com/reblog_e.png?x-id=75beca7f-21b4-490a-9b3b-db6d230bb0e1)


![Reblog this post [with Zemanta]](http://img.zemanta.com/reblog_e.png?x-id=e9a55a8b-89c0-4539-bdb3-9046793150c2)