Dion Moult Seriously who ever reads this description.

Tech Tip: Speed up Firefox to use less CPU.

firefox_throbberIt seems as though I’m coming up with a lot of little series here on my blog.  Such existing examples include “How to actually use your computer”, “How to make a website”, and “Rapid fire”. I’ve decided to start yet another one. This one, as you’ve probably guessed from the title, is called “Tech Tips”.

For the first ever Tech Tip post, I’ve decided to address an issue quite a lot of Firefox users are experiencing. Mozilla Firefox is a popular browser and so it should seem a sad issue when people experience 30% or more CPU usage. Some testing has revealed the culprit to be tabs. Not just tabs, but specifically the loading animation – those spinning circle things – that cause this CPU usage.

Are you a victim of this issue? It’s simple to test. Open up about 3 or more tabs and tell them to load non-existent pages. This will cause Firefox to load them until they timeout. During this period, quickly fire up an xterm and start up “top”. Check the X and firefox CPU usages. If you are on Windows, press control-alt-delete and go to system processes, check the CPU usage. If you see spikes (sudden surges in CPU % usage), it’s likely it’s because of Mozilla Firefox.

Alright. How do I fix this issue? Well, you’ll have to remove that annoying loading animation. (You can try change it to something that isn’t animated, but I haven’t tested that). To remove it, you don’t need to do dirty hacks into your theme, but simply edit the Firefox css. That’s right, it’s really simple! (Wow, the power of open-source yet again!)

Step 1: If you are on Linux, go to your ~/.mozilla/firefox/***.default/chrome/ folder, where *** is a random bunch of characters. If you are on Windows, go to C:\Program Files\Mozilla Firefox\chrome\

Step 2: In that directory, find a file called userChrome-example.css. Rename it to userChrome.css. If you look in the file, you should see some examples with lots of comments explaining what things do.

Step 3: The thing you’re looking for is called the “throbber”. Stupid name, I know, but that’s what it’s called. Add these few lines and it should remove the Throbber animation on the top right of the window and the Throbber animation on each of the individual tabs – respectively (for each code block).

/* Eliminate the throbber and its annoying movement */
#throbber-box {
display: none !important;
}
/* Remove tab loading indicator while the tab is loading */
.tabbrowser-tabs *|tab[busy] .tab-icon {
display: none !important;
}

Step 4: Restart Firefox and all Throbber nastiness should be gone. Your Firefox should now use sane CPU % and feel faster in general.

Hope it helped!

Related posts:

  1. Why is Chrome OS going to be successful?
  2. Big Brother Google, hello goodbye.
  3. Tech tip #4: Copy a random set of files from a directory.
  4. Tech Tip #5: Rotate a video by 90 degrees with mencoder


13 Comments

p. says: (25 February 2009)

Hey,it really worked!-though i found two files both named userChrome-example.(is that supposed to be?)
thanks a lot.None of those spinning wheels above now.
:D

p. says: (25 February 2009)

uh oh,it didn’t work permanently.
am i supposed to copy the whole phrase above and paste it?
from
/* Eliminate the throbber and its annoying movement */
up to
display: none !important;
}
?

Dion Moult says: (25 February 2009)

Yes – though of course it depends on what theme exactly you have running. If you change the theme, you’ll have to apply this hack again.

p. says: (25 February 2009)

what do you mean by ‘theme’?

Dion Moult says: (25 February 2009)

See Tools -> Add-ons -> Themes.

NathanKP says: (26 February 2009)

Wow! I never realized that the spinning circle took up that much processor time. That’s almost unbelievable.

NathanKP

Pavlos says: (26 July 2009)

Thanks for the great tip.I have a problem though while the throbber eliminated, the tab loading indicator still showing up while the tab is loading.Is there a way to fix this?I am using firefox 3.0.12 in ubuntu.

Dion Moult says: (26 July 2009)

Might want to check you commented all the code out as necessary, or if not do a quick search for where else a throbber might be generated. (I don’t have 3.0.12 on me now so I can’t check sorry)

eclas says: (27 August 2009)

Didn’t work for me.
using Firefox v3.0.13
Vista x64

Dion Moult says: (27 August 2009)

eclas, firstly you should check via your system monitor whether or not you are actually affected by this issue. Not everybody is, and only if you are should you bother to do this.

Note that this is also theme dependent – change your theme, you’ll have to redo it (with different syntax because themes are different)

crazy_ bob says: (1 March 2010)

This is quite old now, but I have firefox 3.6 – is this disable throbber option available in 3.6 too?

Dion Moult says: (2 March 2010)

Yes, it should work.

kurato says: (24 April 2010)

i found my chrome in C:\Program Files\Mozilla Firefox\defaults\profile\chrome. not the same path that you display. but it still work for me ^^. ty, it reduce from 100% to 30-70%, sweet. now i can watch youtube properly

Leave a Comment