You are here

Memory Leak/Crash; 64-bit Stable Build recommendation?

10 posts / 0 new
Last post
testplayer
Offline
Last seen: 2 months 3 weeks ago
Joined: 2015-01-12 05:47
Memory Leak/Crash; 64-bit Stable Build recommendation?

I was happy with the standard Firefox portable (stable release, currently 37.0.1), and I have been using more than 70 extensions in my current profile which can be traced back to 2008. But in the recent several months, I do have too many tabs opened, so it is quite easy to make firefox.exe to occupy more than 2.4GB memory. In this case, the whole browser window will be completely blank without showing anything and CPU usage will blow up. It is quite annoying because I had to kill the process frequently and resume my work every time. Is there any method to avoid this memory leak, or is there any stable 64-bit build of Firefox portable? There is only a 64-bit nightly build officially here, but I don't want to upgrade my browser everyday. Alternative options seem to be Pale moon or Waterfox, and looks like Waterfox has a standard .paf.exe format package, so in this case, can I simply move my old profile for standard firefox portable to the profile folder of Waterfox portable?

Any suggestions? Thanks.

Update: I've just noticed that Mozilla had made 64-bit beta build available https://www.mozilla.org/en-US/firefox/beta/all/. So, Dear John, could you please make a portable edition of that? Thank you.

John T. Haller
John T. Haller's picture
Offline
Last seen: 8 hours 42 min ago
AdminDeveloperModeratorTranslator
Joined: 2005-11-28 22:21
Not Yet Stable, Lightening Up RAM Load

Firefox's 64-bit builds aren't yet stable, which is why they're only available as Nightly and Beta. Waterfox and Pale Moon just take the existing code and compile it as 64-bit, bugs and all. Pale Moon is likely buggier than Waterfox since it's based on the older ESR branch which has had less 64-bit work. Once Firefox is available as 64-bit, we may do a dual mode version of it at some point.

Hitting a 2GB limit in your browser is a bit of a seriously extreme use case. I'd highly recommend going through your extensions and removing ones you don't need as well as finding other extensions that may replace the work of multiple others. Extensions can add quite a bit of weight in terms of both RAM and CPU to each page load, so you're likely slowing down your browser experience quite a bit.

As for tabs, it's likely you're working a bit inefficiently, even apart from RAM issues, so you might want to rethink the way you organize. You can easily have dozens of tabs loaded without hitting the memory limit (unless you have an absurd amount of inefficient extensions, as you may), but that doesn't mean you're not getting in the way of your own work. Firefox doesn't load existing tabs until you access them, so even if you had 80 tabs loaded from your last session, Firefox isn't loading them until you access them. If you don't access them, it won't load them.

I'd recommend looking into tab groups to help organize so you can work more effectively (even apart from RAM issues) as well as bookmarking groups of tabs. You can do this by right-clicking a tab and selecting "Bookmark all tabs". You can also right-click on a folder of bookmarks and select "Open all in tabs". Putting these 3 together can help you to easily switch between "modes" of work (personal, project 1, project 2, etc) while still keeping everything easily accessible. Having tons of tabs open and actively working with tons of extensions will make your browser less stable regardless of 32vs64-bit or browser engine (Firefox, Chrome, etc).

Sometimes, the impossible can become possible, if you're awesome!

testplayer
Offline
Last seen: 2 months 3 weeks ago
Joined: 2015-01-12 05:47
Thanks for you reply first!

Thanks for you reply first!

Well, yes, I have about 30 tabs opened, but only less than 10 actually loaded, the rest of them are just there without occupying too much memory. But the problem is, if I loaded say 10 tabs, then the memory usage grows up to 2GB for example, but when I close the 9 loaded tabs, the memory usage is almost unchanged. Now if I load more tabs, say 15 tabs, especially if the tab loads a plugin like Flash, then the memory use may blow up and firefox just freeze or becomes completely blank so that I have to kill the process.

I think the major problem may be the extensions. But I really don't have time to go through every extension, and I have to say that I really don't like change in browsing habit.

According to the 6 weeks rule, 64-bit build may become stable as early as May. So will you make it officially portable at that time?

John T. Haller
John T. Haller's picture
Offline
Last seen: 8 hours 42 min ago
AdminDeveloperModeratorTranslator
Joined: 2005-11-28 22:21
Definitely Extensions, 64-bit Won't Fix It

That's definitely an extensions issue. I have 10 tabs open in Firefox Stable 32-bit with AdBlock Plus running (a high RAM/CPU user) and am at 600MB on Windows 8.1 x64. That's about where you should be. Essentially, you have some *severe* extension memory issues. Switching to 64-bit won't fix your issue, it'll just let the leak go further until the browser crashes. But the leak will still continue and your browser will still crash. And rather quickly based on your stats above.

Sometimes, the impossible can become possible, if you're awesome!

testplayer
Offline
Last seen: 2 months 3 weeks ago
Joined: 2015-01-12 05:47
Is there a debug tool to see

Is there a debug tool to see memory consumption of each extension? I remember google chrome can do it because each extension in google chrome has a separated thread.

Well, I know if I go to 64-bit the problem may continue, but at least it can go beyond about 2.4GB memory without crash because I have 32GB to let it leak. But now it just crashes too frequently, maybe once or twice everyday, too annoying.

John T. Haller
John T. Haller's picture
Offline
Last seen: 8 hours 42 min ago
AdminDeveloperModeratorTranslator
Joined: 2005-11-28 22:21
Disable All

I'd recommend disabling all your extensions and confirm that it works as expected (to rule out a plugin issue, of course). Then try enabling them 10 at a time to see when it's introduced. Firefox extensions are much more powerful than Chrome's, so they can hook into much deeper processes. The tradeoff is that they are harder to troubleshoot and more likely to cause things like memory leaks when coded poorly. Most extensions on addons.mozilla.org are pretty well vetted just because of the size of their userbase. I recommend against installing extensions from other sources.

Sometimes, the impossible can become possible, if you're awesome!

richo
richo's picture
Offline
Last seen: 2 weeks 2 days ago
Joined: 2007-01-31 22:03
RE: Definitely Extensions, 64-bit Won't Fix It

I have to agree with John that it's the extensions you've got installed. Below are the 2 versions of Firefox that I use, they have most the same extensions and plugins.

Firefox 37.0.1 32-Bit
Tabs open and loaded (all different sites): 12
Plugins: 12
Extensions: 11
Non-default Theme active: True
Memory Size: ~230,000 KB

Firefox Developer Edition (Aurora) 39.0a2 64-Bit
Tabs open and loaded (all different sites): 11
Plugins: 7
Extensions: 9
Non-default Theme active: True
Memory Size: ~620,000 KB

As you can see, the 64-Bit version that I use actually uses far more memory than the 32-Bit Stable version does.

And you know what, it has a couple less plugins and extensions installed, and had 1 less tab open (not that this would even make much difference anyway).

Admittedly, half of that memory use would be due to the fact that 64-bit Firefox isn't adequately stable enough yet and 64-bit requiring roughly double memory anyway.

I'm running Windows 7 Home Premium SP1 x64

Midknyte
Offline
Last seen: 2 years 10 months ago
Joined: 2009-04-22 13:56
Try uBlock instead

That's a lot of tabs and extensions. I agree that going to 64 bit won't solve the issue.

ABP is a huge memory hog and that's just one extension. You could try replacing it with ublock. It's just as effective and uses a lot less memory.
https://github.com/gorhill/uBlock/releases

John T. Haller
John T. Haller's picture
Offline
Last seen: 8 hours 42 min ago
AdminDeveloperModeratorTranslator
Joined: 2005-11-28 22:21
Some Issues

uBlock still has some technical issues as it's early in the development in the Firefox version.

uBlock also has a different philosophy from AdBlock Plus in that it blocks not only ads but analytics. So, you visiting a site would cost them bandwidth/CPU time but would not register as a visitor in a hosted analytics package like Google Analytics (most everyone at this point uses third party hosted analytics). This affects valuations for partnerships as well as ad buys. It even affects donations that come with sitewide "sponsored by" messages and similar.

Sometimes, the impossible can become possible, if you're awesome!

Midknyte
Offline
Last seen: 2 years 10 months ago
Joined: 2009-04-22 13:56
Ah, fair enough. I was not

Ah, fair enough. I was not aware of the analytics aspect.

Log in or register to post comments