Why is Firefox so slow?

After updrading to ubuntu 12.04 LTS (on a DELL Studio XPS) firefox is not working like it should. It takes a lot of time before launching (> 20 seconds) and the application is abnormally slow, not to say "totally unusable"

I already tried to remove it and reinstall it, did not resolve the problem.


Possible Reasons:

  1. Too many tabs open on start-up
  2. Too many add-ons installed
  3. Problematic add-ons

Solutions:

  • If you think you may have too many tabs open at start-up, see if using the new feature, "Don't load tabs until selected", helps any.

enabling don't load until selected

  • Having too many add-ons installed can greatly affect Firefox's performance. Try removing some unnecessary add-ons.

  • Check for any add-on that is causing a problem. First open Firefox in safe mode by going to help menu and selecting "Restart with add-ons disabled". If performace of Firefox suddenly improves in safe mode that means one of your add-ons is culprit. To find the problematic add-on disable add-ons one by one until the issue is resolved. Hare's a list of problematic extensions at MozillaZine.

If the above options don't help, try creating a new user profile.

Make sure that Firefox is closed. Press Alt+F2 and run the following command:

firefox -profilemanager

Create a new profile and see if that solves your problem.

choose user profile

If nothing works then you can reinstall Firefox. You can do it by running these commands in terminal.

sudo apt-get purge firefox

sudo apt-get install firefox

Useful extensions to improve Firefox performance:

  • Memory Restart

    Memory Restart is a very handy add-on to keep an eye on memory usage of Firefox and restart if memory usage gets to high.

Additional sources:

  • Performance best practices in extensions
  • Firefox is slow from Mozilla Help
  • High memory usage from Mozilla help
  • High CPU usage from Mozilla help
  • Firefox takes a long time to start up from Mozilla help

Some reasons

Slow Firefox start-up can be explained by at least the following factors that I know of:

  • Growing size of the internal Firefox Database
  • Add-ons that are slowing down Firefox

Solution 1 - Optimise databases

To optimise the databases of Firefox, you can use the following script: Firefox optimisation for Linux It simply run optimisation command on the databases that it founds in your user directory. You need to install sqlite3 though, it's available by default in the UBuntu's repositoies.b

Solution2 - an add-on might be slowing down Firefox

For the add-ons, try disabling them one by one and restart Firefox each time. If one is making Firefox much slower then you have to assess: "do I really need this add-on?"