Firefox Defragger

About Firefox Defragger

This tool loops through all of your Firefox profiles and defrags (or optimizes) the various *.sqlite files for each, decreasing startup times and also increasing responsiveness. See here for more information.

It has been coded in NSIS (Nullsoft Scriptable Install System), and uses the FindProcDLL plug-in.
I tried my best to comment little notes to myself while coding this program, so I believe it’s well documented.

Have any questions/comments? E-Mail me.

What does it do?

Here’s a walkthrough of what it does:

  1. Detects if Firefox is running or not. If it is, then it will ask you to close Firefox before retrying.
  2. Detects your Application Data path
  3. Starts a loop that:
    1. Gets the path of the Firefox profile
    2. Checks the path to see if it exists (if not, then it skips it)
    3. Extracts the batch and SQLite executables to the profile folder
    4. Launches the batch script, which defrags the various *.sqlite files
    5. Deletes the batch and SQLite executables when done
    6. Moves onto the next Firefox profile

Download (binary, source code)

FirefoxDefragger.exe | Source Code