PhotoDude.com

Wed. May 04, 2005

Firefox or Firehog?

Firefox has a problem. Well, more than one, but we’ll deal with this one first. If you are lucky enough to have a stable computer than will run for weeks without rebooting, and you try to keep Firefox open an equal amount of time, it will slowly but surely suck up every megabyte of RAM within a 500 yard radius. Your neighbors will knock on your door begging you to please close a few tabs so they can check their e-mail.

I know it’s better to have a browser that’s memory impaired yet doesn’t take down the operating system than it is to have a browser (IE) that can crash it all down (via memory or infection or worse). But from user point of view, it’s all the same pain in the patooty. I have to jump through stupid software hoops just to keep surfing.

Here’s a detailing of the hoggish behavior: I open Firefox with a single window and a single tab, and it eats 47 MB of RAM. Fine. A couple of hours later, I find myself with 2 browser windows open. There are 12 tabs in one, and five in the other. Firefox is now eating 198 MB of RAM. So I bookmark all those tabs and close the browsers (yes, I know about SessionSaver ... very well, because it makes Firefox completely non-functional on my machine). With an empty taskbar, the memory clears. So I reopen Firefox, and those bookmarked tabs in two windows. Firefox is now chewing on 115 MB of RAM.

Is it just me, or does it seem completely freakin’ insane that it takes 100 to 200 MB of memory to render a total of perhaps 1 MB of HTML and CSS?

Yes, I tried the about:config trick that allegedly will “Fix a memory leak in Firefox 1.0.” It’s useless. I can tell no difference at all since I made that tweak.

I realize that betas are not optimized for memory usage, and that’s usually one of the last problems fixed before a new release. Firefox’s memory problem has been well known since beta version 0.7. But we’re well past betas. Exactly when do the developers of Firefox plan to address this issue? Version 2.0?

What version am I running now, you ask? 1.0.1

Oh, that’s not the latest and greatest, and I should upgrade? Oh, please.

Peanut Gallery

1  rturner wrote:

I don’t have the answer, but I’m glad to hear I haven’t been imagining things (I hadn’t checked processes to see about the memory drain). I had found myself leaving firefox with a few tabs open for a couple hours, then shutting it down, and it seemed like my systems were running faster then when I’d leave it on all the time. It’s cross-platform too. I found I had to close it periodically on my linux machine or it would drag that one down too. Firehawg.

2  Matt wrote:

You mentioned you were getting a mac, right?

I have only one word, with an alternate, for you:

Safari (or Omniweb)

Both browsers kick Firefox’s ass, despite how well Firefox is loved by opinionated geeks.

Comment by Matt · 05/04/05 03:37 PM
3  Reid wrote:

Yes, I expect to order my Mac Mini in the next few weeks here. But the fact there will be a new OS on my desktop does not mean it will become the primary OS. So that’s not really a workable solution for me. I agree, Safari is great, and it’s ironic that one of the reasons I most want to get a Mac is to have access to Mac browsers.

It is especially ironic because I seem to have a high proportion of clients who are full-time users of Mac/IE, and they report troubles I have a hard time even believing. I was looking forward to a machine that would at least allow me to see how to fix such perversities.

But the OS Gods are far too perverse for that. The Tiger release of OS X now ships without IE, making it officially no longer supported by Apple. I’ll have to make a special download of it from MS, who stopped developing/supporting it years ago.

Apparently the only person left who still has to support it is … me.

Comment by Reid · 05/04/05 04:02 PM
4  Peter wrote:

In practical terms, the fact that Apple is no longer shipping MSIE isn’t the indicator that MSIE isn’t supported by Apple. The fact that Microsoft stopped development on MSIE for Mac at Version 5.23 for OSX/5.17 for OS9 – that’s the indicator. For over two years now, if you used MSIE on Mac, you were on your own.

The only reason I haven’t long since trashed MSIE is that there are still some not-really-Javascript sites that don’t work in anything else. Of course, most of those sites don’t really work in anything except the latest version of MSIE for Windows (6.something?) At this stage, an increasing percentage of sites simply don’t render in MSIE for Mac at all…which, oddly enough, was exactly the symptom that made me abandon Netscape Navigator 4.08 for MSIE in the first place, a-many years ago.

Good riddance to bad rubbish.

Comment by Peter · 05/05/05 05:14 AM
5  Stewart Johnson wrote:

My FF has been running all day, it now has 7 tabs. I’ve been opening and closing new FF windows too. Currently sitting at 132M.

Close, restart, SessionSaver opens everything up again. Usage: 45M.

Ouch.

6  Scott Chaffin wrote:

Wow…I’d never heard of this phenomenon, but my results are exactly like Stewart’s. I was blaming everything on Outlook and NEO. Back in the old days, I wouldn’t call this a bug, but a serious freaking defect that would make a product unshippable. I can’t believe things have changed this much.

I guess you get what you pay for, though.

7  Todd H. wrote:

This is an old problem, dating back to the dinosaurs, as programming goes. It’s not the horizontal, it’s not the vertical- it’s a program bug. It even has a name- it’s called a “Memory Leak”.

The way it works is this- when a program needs to use memory, it has to ask for it from the operating system. It is expected to tell the operating system when it’s done with that memory, so that it can be used again. This is called ‘releasing’ the memory.

If you’re not a completely anal freak about memory allocation, you can and will forget to release some memory you’ve allocated. This bit of memory is now in a kind of digital limbo- your program is no longer using it, and the system doesn’t know it’s not being used, so it’s just basically gone from view… leaked.

What you’ve described is a classic memory leak- where the memory used does not return to the same value when you’re in the same condition.

Unfortunately, there’s nothing you as a user can do to help this, other than bitch at the programmers. :)

8  Al wrote:

On a mozillaZine thread entitled, Back and Forward Now Blazingly Fast, a question about a new (disabled by default) feature in the nightlies is asked:

bq. What is the impact on memory usage, as a consequence on enabling this feature?

And answered:

bq. None, as Firefox already currently expands to fill all of the available system memory :-)

On preview: No blockquote… too bad, I’m leaving them anyway.

Comment by Al · 05/05/05 10:46 PM
9  Steve Stewart wrote:

Todd, do you think it’s all just a case of leaking?

It’s OBVIOUS there are some leaks, because the longer you leave up firefox, the more and more memory it eats up. Most likely a leak, for sure.

But just starting it up, opening a few pages and checking the memory usage, the thing is hogging up a ton. Unless the startp and render routines are leaking like cheap seives, the thing seems to have other memory “issues.”

Meh, I may be less of a man now than when I had to do my own memory managment…but I’m quite fond of working in an environment that manages memory for you. I do not regret that a forgotten “delete” is no longer going to lead to a leak.

free(steve);

10  Reid wrote:

I’m quite fond of working in an environment that manages memory for you

First off, not everyone sees this problem on their system. Of course, Al’s probably testing Firefox on an Amiga or Commodore 64, just to be a contrarian and prove me wrong. Just the same, I appreciate him pointing out that the developers of Firefox view the memory leak as a joke ... hardy-freakin’-har.

Secondly, I’m pretty anal about memory management. I think anyone who uses Photoshop regularly (or has been using it for any length of time) is more “memory aware” than most. Like those of us who once watched Photoshop 3.0 crawl to a start on a system with 16 MB of RAM. And Photoshop is horrid about releasing memory, so you have to make sure all your other apps are behaving.

Now, even with a GB of RAM, I have FreeMem running all the time, and when my available RAM drops below 500 MB … it makes me nervous. So I see what the heck is eating all the memory, and invariably, the answer is Firefox.

I’d also note, there are times I’m working that I have Firefox open, along with Internet Explorer, Dreamweaver, Fireworks, Photoshop, Notetab Pro, and an Explorer window. Even with that combo of RAM hogging apps, it’s always Firefox that’s the one misbehaving the worst.

Comment by Reid · 05/06/05 09:35 AM
11  LadyNiniane wrote:

This is an old problem, dating back to the dinosaurs, as programming goes. It’s not the horizontal, it’s not the vertical- it’s a program bug. It even has a name- it’s called a “Memory Leak”.

And when one says ‘dinosaur’, one really means ‘dinosaur’. The problem/program feature has existed in every mainframe operating system that uses any form of virtual memory. Ask any systems programmer why IBM mainframes are routinely IPL-ed every weekend – it’s not for testing the third-shift operators, as some of them would like to think.

Comments are closed for this article

SEARCH The Daily Whim

OR BROWSE BY CATEGORY

SEARCH ENTIRE SITE

ARCHIVES:
 Articles, Photos, Links, Quotes, Downloads
ELSEWHERE:
 flickr, del.icio.us, twitter
Feeds
FEEDS:
 One Big Feed
TEXT ONLY:
 RSS/Atom
PHOTOS ONLY:
 RSS/Atom

Recent Comments

ReidStott.com

Web Design &
Photography
by Reid Stott
Web Design & Photography by Reid Stott A decade of web design experience. Two decades of photography experience. All available to you, and your project. View my portfolio online, then let's talk about your needs.

ReidStott.com

Contact me to find out more