Skip to content

Entries from February 2010.

Firefox on laptops

Here's a neat trick that gives me an extra hour or two of battery life on my MacBook Pro. When I don't need Firefox but would rather not close it, just SIGSTOP it. I'm doing this on Mac OS X, but it almost certainly works on any other *nix system also.

% killall -STOP firefox-bin

And when I want to use it again,

% killall -CONT firefox-bin

Stopping it drops the CPU usage by about 5-10% and causes fewer wakeups. This pushes my battery life from about 4.5 hours to 6.5 hours when I'm just typing away in vim.

Perhaps some day Firefox's idle loop won't be quite so intensive. Though I usually have several Firefox windows open with about 50 tabs in total, so you could argue that I've only myself to blame.