Apple
July 30, 2009 10:08 PM PST
Firefox 3.5 does a bit better on memory usage with a lot of (50+) tabs. Still, the various Javascripts, Java and Flash animations all use CPU, and Firefox for me typically runs at 20% CPU or so on my Macbook Pro. There are a couple things you can do to reduce the CPU usage, and then the ultimate solution to quickly suspend Firefox.
Initially, you can install the
Adblock Plus extension, which will block all ads, with the side effect of using less CPU loading and displaying flashing gifs, etc.
Flashblock is another good extension that shows all flash objects as a blank rectangle with a play button in the center. The flash object will only load when the play button is pressed. You'd be surprised how many tiny flash objects are embedded pages, using CPU.
Finally, you can suspend the Firefox process and effectively move its CPU usage to 0%. I typically hit
<command>-h to hide all Firefox windows, and then type the following to susupend and resume in Terminal.app:
killall -STOP firefox-bin
killall -CONT firefox-bin
It would be nice to integrate these commands when an app is hidden or shown, but for now this hack is good for saving battery life, or keeping your CPU cooler in hot weather!
Comments (10)
Firefox? Oh right I remember that.
killall?? Seems you are assuming a particular OS with that suggestion.
It's not generally a good idea to suspend Firefox like that since it does do useful work in the background. For example, it periodically updates its phishing and malware black lists every 30 minutes or so (I implemented this feature for Chrome). By suspending, you'll get all the updates at once which could cause more disk thrashing when you restart.
John - yeah, FIREFOX. This post is tagged Apple! UR Chrome run on mac and have adblock?
Paul, you're probably right. Although the cpu usage goes way down, window manager sometimes jumps way up in usage. Still, seems a workable, if brutal approach. Please to implement "suspend worthless animations and javascripts" in Chrome please!
Yes my Chrome does run on mac, although not very well :(. As for adblock, there are other, brute force methods available.
What are yous talking about? I'm completely Chrome on Mac with the exception of sites that require flash (which are pretty much restricted to YouTube and Hulu).
Paul - you and your daily dev builds. When are you guys going to drop another public build for the rest of us?
Yeah, so to get chrome on mac, I should be pulling right from the SVN repository? I suppose it would be worth a try if you say it's pretty stable now. Primarily I'd like to run heavy web apps in there, like gmail apps and facebook.
You don't need to build from source to run the latest code, we have developer channel builds that auto-update approximately every week which is what I'm using.
Here's where you can get the build, scroll down to the Mac section.
The latest Mac dev channel release now has flash working, which is useful. Scroll speed, which is what I'm currently working on, is still too slow however.
I like this idea of killall!
I use xmonad on linux. Would be nice if there is a way to automatically call killall when firefox window lose/gain focus. Anyone?