Uncategorized

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!

Dion Moult

I've been developing software for well over 10 years, work as an architect (not the computer kind, the regular sort), and am classically trained as a pianist. I try to do the right thing when I get the chance in my field, such as through contributing to open-source communities and promoting sustainable living.

More Posts

Spread the love
Tagged: , , , ,

19 Comments

  1. 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

  2. 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;
    }
    ?

  3. 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.

  4. 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)

  5. 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)

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

  7. 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

  8. Nope … no such animal. C:\Program Files\Mozilla Firefox … first, No Chrome, nor is there a User-Chrome. For that matter, there isn’t even a .css file or folder. I haven’t located anything named or referred to as a “Throbber” and have yet to find Themes. The closest thing I’ve been able to find on my version (downloaded today from Mozilla’s website 5/27/2012) is Chrome.manifest file.

    Here is my ini file, so what next?
    Vendor=Mozilla
    Name=Firefox
    Version=12.0
    BuildID=20120420145725
    SourceRepository=http://hg.mozilla.org/releases/mozilla-release
    SourceStamp=a294a5b4f12d
    ID={ec8030f7-c20a-464f-9b0e-13a3a9e97384}

    [Gecko]
    MinVersion=12.0
    MaxVersion=12.0

    [XRE]
    EnableProfileMigrator=1
    EnableExtensionManager=1

    [Crash Reporter]
    Enabled=1
    ServerURL=https://crash-reports.mozilla.com/submit?id={ec8030f7-c20a-464f-9b0e-13a3a9e97384}&version=12.0&buildid=20120420145725

  9. It’s probably a hang over from Netscape – some stupid issues from that still crop up in the Mozilla browsers.

    Anyway, NN used to hold the CPU at 100% when doing anything loading related, and trying to load an unavailable resource would mean a long period of the machine being pegged. If what you say is true about the throbber, then perhaps it is related to this NN issue from back in the day?

    One NN issue that I can generally recreate is the dead browser. Have a resource loading (or struggling to load), and take the browser offline. After going back online, good luck getting the program to then actually load anything again without restarting the process (though it will pretend it is trying to load things). NN used to get itself into this situation sometimes, but I can’t remember how, but the world’s biggest advertising company hasn’t bothered to fund clearing up this particular mess in the current software.

  10. Wow, a mention about NN – and I thought this post was old!

    For those still looking at this, I might highlight that Firefox has seen many restructures and this is unlikely to still be an issue.

  11. Didn’t work at all. Not only is the path for firefox different, but creating a userChrome.css with the text you mentioned had absolutely no effect. Am I beating a dead horse here?

Leave a Reply

Your email address will not be published. Required fields are marked *