views:

544

answers:

6

I'm loading some fairly big data sets in to firefox (500 k or so) and drawing tables with them. Firefox is using up to 400 megs of memory. How can I tell if Firefox is leaking memory, or is just using a lot of memory just because it can?

Is there another browser which will use less memory if it doesn't need it? I get the feeling that firefox grabs a bunch of memory for itself and doesn't release it unless it has to. It may be apparent that my understanding of memory management in general is very superficial.

+6  A: 

There is a setting you can set in firefox that forces it to free as much memory as it can on minimise:

  1. On the website url toolbar type about:config
  2. A page full of words will come up. right click anywhere and choose New -> Boolean
  3. For the name input type "config.trim_on_minimize" Select True
  4. Restart FireFox.
ck
cool. thanks! what do you mean by "on minimize"? When you minimize the browser window?
morgancodes
Yes, when you physically minimise it (through Windows+M or clicking the minimise button, or right click on the task bar and minimise).
ck
+1 - This is great, I've been running into the same issue except it occurs when I use Pandora to listen to music. I've been below 100K constantly instead of the usual 500K+ since I added this setting.
John Rasch
+1  A: 

If it is leaking memory, then the mem usage (number of K) in your Windows task manager will continue to grow. If this number is fairly consistent, then Firefox is behaving normally. It is my opinion that Firefox requires far too much memory to behave normally.

Josh Stodola
A: 

You can turn on Windows Performance Monitor and see if the firefox.exe process is growing memory over time to confirm if there is a memory leak.

+1  A: 

How can I tell if Firefox is leaking memory, or is just using a lot of memory just because it can?

Open another page in a different tab. Then close your 'big' tab and see if the memory is freed.

Joel Coehoorn
A: 

I get the feeling that firefox grabs a bunch of memory for itself and doesn't release it unless it has to. It may be apparent that my understanding of memory management in general is very superficial.

well, at 1 point Firefox requires a lot of memory, say 400Mb. maybe after that, it doesn't require so many memory, BUT

since your system do not need this memory, it does not reclaim it to Firefox, which keeps it.

If ever you launch other processes that need a lot of memory, then your OS will claim back memory to other processes that are running with a high priority.

To summarize my ideas : it's probably not a memory leak.

Is there another browser which will use less memory if it doesn't need it?

why don't you try them?

chburd
+1  A: 

Memory Leak - memory which is not released when it should be

If the memory Firefox is allocating to hold your data is released when you navigate away from your page, there is no memory leak. You can than argue if Firefox if using too much memory or not, but that is something beyond your scope.

You do have a leak on your hands if that memory is not released. In that case you should check if it is something you can handle in your JS code, or a firefox bug. If it's the latter, go ahead to the mozilla bugzilla, and open a ticket.

Yuval A