For all its life, that I know of, Firefox has been subject to criticism about memory usage. For a long time I took it for granted that it had a "memory leak," and only gradually did I start to wonder why the developers would fail for so long to fix a problem so basic in an application used so widely. Then a while ago I read a Slashdot discussion on the topic and realized that, to the developers, what many consider a memory leak is really a feature: namely, the aggressive caching of recently visited pages so that "Back" button usage can display the page instantly without having to fetch it again.
I had long thought that the most conclusive evidence of a memory problem was that, when I tried to close a bunch of tabs to free up system memory, there would be no decline at all in FF's memory usage. Others apparently share this experience. But I learned from this discussion that this is because a static number of recently visited pages are cached regardless of which tabs or windows they were in. This enables the sometimes nice feature of being able to get back recently closed tabs through the History menu. It just went against my perhaps outdated expectation that once a tab was closed it was gone, and should be gone from memory too.
To me, it would be a nice option for Firefox if it could only cache the n most recently closed tabs, where n could be 0 or 1 (or any other number of course). However, there are some vague indications that the software's architecture might make this rather difficult. I've considered trying to add it myself, as they say one should do when one has a complaint about open source software. But in my limited experience looking at the code of open source software, I've been extremely confused and unable to make any logical connection between the code and the application that I see when I use it.
Another thought: one Slashdot commenter said that with the Restore Session feature, his problem was alleviated slightly, because he could restart Firefox periodically without losing his tabs, and regain free memory. If we can do this by restarting, why can't we do it with a button on the GUI, or automatically? According to some commenters, it's because of differing memory management methodologies between C++ and garbage-collected environments like Java. The discussion shows that this is a controversial issue and I make no claims to having all the answers. It does also get quite abstruse and technical, but to me it's an important issue at a time when I know some users for whom their browser may as well be their computer.



Comments (2)
solution: use Camino
July 21, 2007 12:01 PM
The standard argument against switching to another browser is that none of them have the amazing library of extensions that Firefox has. I probably use a lot fewer extensions than most power users, but the two that I do use are pretty vital for me: del.icio.us, which I use to access my bookmarks, and Firebug, for web development. I'm not aware of any substitutes in Camino.
August 27, 2007 3:13 PM