[Gc] Firefox

David Chisnall theraven at theravensnest.org
Tue Jun 7 05:12:29 PDT 2011

On 7 Jun 2011, at 12:53, Andrew Haley wrote:

> On 06/07/2011 10:42 AM, Glauco Masotti wrote:
>> Hi. I hope not to be out of scope here, but the thing seems relevant to me. 
>> Firefox is IMHO the best choice as a browser, but it's a memory hog.
>> NoScript can help, but the heap tends to grow almost monotonically.
>> After some hours browsing, if you have several frames active, it's easy to have a heap of 500-600 MB!
>> At this point it's amazing that the program can take several minutes to shut down, before freeing memory!
>> What about suggesting those guys in the R&D to use the GC?
> This is rather assuming that the core problem is memory leaks.  I
> suspect that it isn't: the state of those pages requires that much
> memory.  Firefox is caching pages so that you can go back and forth
> quickly.  I think it's just a trade-off between local memory use and
> network traffic.
> See browser.sessionhistory.max_entries
> None of this means that there aren't bugs that cause memory leaks, of
> course...

I've seen a few memory leaks identified in FireFox over past few years, but none of them were things that GC would fix.  The most common cause of memory leaks is extensions that keep references around that they will never use.  These are JavaScript, so already benefit from GC, although the lack of weak references in JavaScript makes memory leaks very easy to write.

GC only protects you against the trivial kind of memory leaks caused by poor implementation, not the common kind caused by poor design.


More information about the Gc mailing list