This is an unbelievable trick. If you’ve been running Firefox for a long time, it gets a lot more sluggish. Here’s how to optimize its databases and give it back its youthful vigor.First, go to Tools, Error Console. Copy and paste this long and obnoxious line in:
Components.classes["@mozilla.org/browser/nav-history-service;1"].getService(Components.interfaces.nsPIPlacesDatabase).DBConnection.executeSimpleSQL("VACUUM");
Click Evaluate and wait. Firefox will appear to lock up, but fear not, when the query finishes, it’ll recover with a vengeance, loading faster, rendering pages faster, and doing just about everything faster.
The difference could be enough to cure new-computer fever, in some cases.
You can close the Error Console window after it finishes.
What this trick does, from a technical standpoint, is dump all the empty space in the databases where it stores all of your data (bookmarks, browsing history, usernames, stuff like that), making it smaller and easier to manage, and, in turn, faster. Whenever data expires, it’s blanked out rather than truly deleted, so the databases just keep on growing over time, contributing to Firefox’s slowdown.
David Farquhar is a computer security professional, entrepreneur, and author. He started his career as a part-time computer technician in 1994, worked his way up to system administrator by 1997, and has specialized in vulnerability management since 2013. He invests in real estate on the side and his hobbies include O gauge trains, baseball cards, and retro computers and video games. A University of Missouri graduate, he holds CISSP and Security+ certifications. He lives in St. Louis with his family.
It does seem to work as advertised. One caveat though, I waited a long time without seeing any visible indication that it was through. Finally gave up and closed it. When I went back into Firefox it was significantly faster. Thanks for sharing this with us.
Actually if it’ll let you close down, then you know it’s done. The only visible indication you have is that the window hangs.
I’m amazed at the difference it made on my machine, but I probably had at least three years’ worth of cruft in there. If I imported my profile from another PC, it could have been more than that.