Speed up Firefox to use less CPU

Dion Moult

2009-02-24

This article was written a long time ago and Firefox has since restructured most of its UI code. This post may no longer be relevant and is kept for historic reasons.

The Firefox loading icon, known as the "throbber"

There is a bug where Firefox consumes excessive CPU resources when loading new websites. This is due to the loading animated image, known as the "throbber", that is displayed on the tab. You can test this by checking your system resources while loading heavy pages or pages that cause a timeout. In Linux, you can check this using the htop terminal program. If you see spikes in CPU usage, it could be due to this bug.

You can fix this by editing the Firefox CSS. If you are on Linux, go to your ~/.mozilla/firefox/\*\*\*.default/chrome/ folder, where \*\*\* is a random bunch of characters generated by Firefox. If you are on Windows, go to C:\\Program Files\\Mozilla Firefox\\chrome\\. 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. The thing you're looking for is called the "throbber". 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).

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

Restart Firefox and all Throbber nastiness should be gone. Your Firefox should now use sane CPU % and feel faster in general. Hope it helped!

Comments

If you have any comments, please send them to dion@thinkmoult.com.