Firefox2 + GMail == Memory Leak
Greetings,
Just noting that I closed my ‘gmail’ window, and my Firefox process went from 883M to 585M.
I guarantee that 300M weren’t being used by the gmail page as it stood. Perhaps Google’s Javascript foo is not as powerful as they’d like, and it’s holding onto old AJAX results?
I can guess a few other things about what might be going wrong (caching AJAX requests in the browser, for instance), but one way or another, if you have memory problems with Firefox 2 and you keep a gmail tab open, try closing your gmail tab now and then.
I have to wonder if it’s a general AJAXy problem with Firefox, or specific to gmail…
One way to test (which I’m going to try soon) is to try a ‘reload page’ instead of a ‘close tab’, to see if it’s the browser/page-renderer/caching keeping the memory occupied, or the JavaScript on the page that is abusing memory.
There are limits to how much CPU we allow any given page of JavaScript to have; I’m surprised there aren’t any limits to how much memory it can have.
– Morgan Schweers, CyberFOX!
“I have to wonder if it’s a general AJAXy problem with Firefox, or specific to gmail…” - I believe that there is nothing inherently wrong with AJAX in Firefox. To begin with, AJAX is not some kind of magical JavaScript module in Firefox (or any other browser, for that matter). It all depends on the implementation. *MAYBE* it has to do with the implementation of XmlHttpRequest in the JavaScript engine of Firefox. Memory leak is a problem that can occur with any looping or recursive JavaScript fragment that doesn’t release reserved memory when it should.