Coding Horror

programming and human factors

Firefox Excessive Memory Usage

I like Firefox. I've even grown to like it slightly more than IE6, mostly because it has a far richer add-on ecosystem.

But I have one serious problem with Firefox:

Massive Firefox memory usage

This screenshot was taken after a few days of regular Firefox usage. That's over 900 megabytes of memory for a single, non-tabbed instance of Firefox.

What's going on? Well, according to my tests, Firefox never seems to release any of the memory it uses-- until you close all instances of Firefox. If you spend enough time browsing the web, and never close Firefox completely, you'll consume nearly a gigabyte of memory!

Because I often keep at least one browser window open for research or reminder purposes, this bites me a lot. I'll look at Task Manager and Firefox will regularly be gobbling up over 400 megabytes. This isn't uncommon. It's normal.

I don't ever recall having this problem with IE 6.

Of course, I can close all instances of Firefox and reduce memory usage back to zero, but why should I have to? I've read this techweb news article on the controversy around Firefox and memory usage, and I've implemented the workaround suggested in that article:

  1. Within Firefox, enter "about:config" (minus the quotation marks) in the address bar
  2. Scroll down to the entry "browser.sessionhistory.max_total_viewers" and double-click it.
  3. In "Enter integer value" field, type..
    • "0" to disable the cache
    • "1" through "8" to set the maximum cache as 1 through 8 previously-viewed pages
    • "-1" to return the cache to its default

Sadly, this fix did very little to address the problem. The above screenshot was taken after setting that value to 1!

Written by Jeff Atwood

Indoor enthusiast. Co-founder of Stack Overflow and Discourse. Disclaimer: I have no idea what I'm talking about. Find me here: https://infosec.exchange/@codinghorror