Small tip for Firefox 3.5 Users

If something doesn't fit in any other forum then post it here.
Forum rules
READ NOW: L2j Forums Rules of Conduct
Post Reply
User avatar
ThePhoenixBird
L2j Inner Circle
L2j Inner Circle
Posts: 1857
Joined: Fri May 27, 2005 5:11 pm

Small tip for Firefox 3.5 Users

Post by ThePhoenixBird »

Taken from http://mozillalinks.org/wp/2009/07/vacu ... rformance/
Vacuum your Firefox databases for better performance
July 10, 2009 - 11:28 am

Since Firefox 3.0, bookmarks, history and most storage is kept in SQLite databases. Also, the default history time span was raised from 9 to 90 days as it became more discoverable and useful thanks to the awesome bar, so depending on your browsing habits it could represent some pretty large databases.

Aas any other database, SQLite databases become fragmented over time and empty spaces appear all around. But, since there are no managing processes checking and optimizing the database, these factors eventually result in a performance hit. So, a good way to improve startup and some other bookmarks and history related tasks is to defragment and trim unused space from these databases.

To do this:

Step 1: get sqlite3, a single file command line SQLite database manager, for your platform (available for Linux, Windows, and Mac OS X).

Step 2: Copy the downloaded binary to your profile folder where all your .sqlite files reside.

Step 3: Close Firefox.

Step 4: From a command line prompt in your profile folder, run:

Code: Select all

sqlite3 [SQLite database] VACUUM
replacing [SQLite database with the name of a SQLite file, like places.sqlite.

On Windows, to defragment all SQLite databases in one command, run:

Code: Select all

for %a in (*.sqlite) do (sqlite3 %a vacuum)
I ran the script in a couple of machines resulting in a noticeable reduction of start up times after databases defragmentation:
Machine places.sqlite size before vacuum places.sqlite size after vacuum Cold startup Before Cold Startup After

Code: Select all

Machine 1: 1 window, 20 tabs 	10 MB 	9 MB 	11 s 	8 sMachine 2: 3 windows, 25 tabs 	40 MB 	27 MB 	10 s 	7 s
So if this is all good, why hasn’t Mozilla included this defragmenting procedure? The thing is they want to but still haven’t found the best way to do so. One of the suggestions so far has been to do it during an update: it has the advantage of been semi regular (about every six weeks), and already interrupts the user workflow (and requires the database files been released, turning Firefox off).

A good option for Windows users is IniFox, by InfoSpyware which simply packs sqlite3 and an interactive batch file that defragments all databases in your profile as described above. You will still have to download and copy, but you will avoid opening a console and repeating the steps for all the databases.

If you try this mechanism, please take some time to get your before and after times and sizes and share your results in the comments. For cold startups, you will have to restart your system to get valid results.
I have my firefox previously loading on 15s and after this it nows loads at 7s on cool
Post Reply