It seems that no matter what I do, Firefox refuses to cooperate...

After using sites like Facebook, and my own sites, that are powered by AJAX (though mine uses iframes instead) - basically any site where you don't actually load any new pages over a long time, but there's plenty of JavaScript in the background - I have noticed the following average results:

Average RAM usage after at least 4 hours of activity on sites like Facebook (1 tab):

  • Chrome: 30Mb
  • IE9: 25Mb
  • Firefox: 650Mb

My friend tells me this is because of Windows messing up with Firefox's garbage collection. But I think that's just him being a Linux+Firefox fanboy...

Can anyone tell me what causes such massive memory leaks just by running JavaScript over an extended period of time? Is there anything that can be done to prevent this?

link|improve this question

40% accept rate
What do you mean? I have had FF open the whole day and it only uses 370MB of memory! ;P – leppie Nov 24 '10 at 12:12
@Kolink - Any flash embedded? – ajreal Nov 24 '10 at 12:13
"My friend tells me this is because of Windows messing up with Firefox's garbage collection. But I think that's just him being a Linux+Firefox fanboy..." - I'm not going to get involved with your little debate... Check your Firefox extensions and plugins. – Neurofluxation Nov 24 '10 at 12:14
stackoverflow.com/questions/2638100/… – Yehonatan Nov 24 '10 at 12:21
feedback

migrated from stackoverflow.com Nov 24 '10 at 12:24

This question came from our site for professional and enthusiast programmers.

closed as not a real question by Diago Nov 24 '10 at 12:26

It's difficult to tell what is being asked here. This question is ambiguous, vague, incomplete, overly broad, or rhetorical and cannot be reasonably answered in its current form. See the FAQ for guidance on how to improve it.

2 Answers

it's open source and you are on a programming site so I am assuming you have an interest in programming,

Build you our own version of firefox from the sources and run valgrind on it.

Then come tell us where the memory leaking is coming from :D

link|improve this answer
feedback

send a bug report to mozilla?

I stopped using firefox a while ago because of this.

link|improve this answer
feedback

Not the answer you're looking for? Browse other questions tagged or ask your own question.