Tech Tip: Speed up Firefox to use less CPU.
It 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:
- Why is Chrome OS going to be successful?
- Big Brother Google, hello goodbye.
- Tech tip #4: Copy a random set of files from a directory.
- Tech Tip #5: Rotate a video by 90 degrees with mencoder
13 Comments