How to speed up Firefox by cleaning its databases
Firefox start up speed and operating speed is usually much faster after clean install rather than month of usage. As it turns out the time at Firefox start up is used to load .sqlite bases from your profile which are used to store the history, bookmarks, anti-phishing, etc. With intensive Firefox usage all these databases are growing in size, getting a lot of empty space and become fragmented. There’s special command which solves this problem. VACUUM command recreates all the .sqlite databases but without fragmentation and empty spaces. The improvement is Firefox you can feel right after doing the follow steps. It’s strange that Mozilla developers haven’t implemented this feature within Firefox.
- Download the last version of SQLite for Windows. Put file sqlite3.exe in C:\Windows directory.
- Using any text editor, create bat file (for example, ‘optimize firefox.bat’) containing this script:
cd /D “%APPDATA%\Mozilla”
for /r %%i in (*.sqlite) do echo VACUUM; | sqlite3 “%%i”
cd /D “%HOMEPATH%\Local Settings\Application Data\Mozilla”
for /r %%i in (*.sqlite) do echo VACUUM; | sqlite3 “%%i” - Close Firefox and run your bat file create in the previous step from drive C.
For Linux the script will look this way:
cd ~/.mozilla/firefox/*.default/
for i in *.sqlite; do echo “VACUUM;” | sqlite3 $i ; done
For Mac:
find ~/Library/Application\ Support/Firefox/Profiles -name ‘*.sqlite’ -exec sqlite3 {} VACUUM \;
SQLite for Mac and Linux can be downloaded here.
Bonus tip: Open about:config, find javascript.options.jit.chrome and set it to ‘true’. It will turn TraceMonkey fast engine for Firefox interface as well (it’s turned on only for pages by default).
Share This

