Hacker News new | past | comments | ask | show | jobs | submit login
Firefox 7 will use up to 50% less memory (geek.com)
149 points by ukdm on Aug 11, 2011 | hide | past | favorite | 99 comments



I'm reminded of MySQL.

"You don't have transaction support" "Sure we do - just handle it in your code" "But I need transactions" "No you don't! That's just overarchitecting!" "No really I do" "Look how fast we are!" ... years later... "Hey look at MySQL - We have transactions! Look how great we are!" etc.

I like FF. I use it. But every time there's some comment about FF memory, we usually see a bunch of people coming out saying they never see FF memory issues, the OP must be doing something wrong or have a bad system, they use their computer non-stop for 4 years without ever even seeing FF slow down, etc. Then endless discussion about "how can you even function having more than 2 tabs open? I always close all mine because of some cognition study from 1974 which I read in my one open tab, then closed it".

Now many of those same people will be spouting how great FF is because they've cut memory usage so much (and maybe how they'll venture in to the brave new world of 3-tabs-at-a-time).

End of the day, this is just how computer stuff goes - deny there's a problem, fix it, then promote how great your fix is. Just gets a bit tiresome.

Oh, and yes, I set up a bunch of strawmen up there. I love the smell of them burning in the morning.


  > I like FF. I use it. But every time there's some comment
  > about FF memory, we usually see a bunch of people coming
  > out saying they never see FF memory issues, the OP must be
  > doing something wrong or have a bad system, they use their
  > computer non-stop for 4 years without ever even seeing FF
  > slow down, etc.
That's because complaints about large memory use in Firefox fall into two camps, generally:

1. "I left Firefox on overnight with three tabs open, and now it's using 3.1 GiB of memory. This browser is terrible! Yes, I do have dozens of low-quality extensions installed, so?"

2. "I started Firefox, and already it's using over 300 MiB! That's insane! Why would a web browser ever use that much? I'm switching to Chrome, it only uses 100 MiB. What do you mean, 'multiple processes'?"

There may in fact be genuine issues buried somewhere in the discussion, but they're hard to discern against the general background noise.

  > Then endless discussion about "how can you even function
  > having more than 2 tabs open? I always close all mine
  > because of some cognition study from 1974 which I read in
  > my one open tab, then closed it".
You're getting confused between Firefox and Chrome. Firefox has always been the browser of choice for the "tons of tabs" crowd, because Chrome's process-per-tab model breaks down when there's more than a few dozen open.

For example, I have just over 70 tabs open right now, Firefox has been running for about a month, and it's at 1.1 GiB resident memory. Chrome becomes very unhappy under such circumstances (since it uses about ~100 MiB per tab), so I'm careful to only open a few tabs at a time.


> I have just over 70 tabs open...

I'm really curious about this as once I get to about 10 tabs my brain starts wanting to close them to get back to something it can manage. This is either because I'm dumb (highly likely) or because you have a different usage style than I (also likely).

So if you don't mind elaborating, how do you get to where you have that many tabs open?


Tree style tabs[1] have changed my life. There are plenty of times I get near 100 tabs. It automatically opens them as subtabs when ctrl or middle clicked. This is great when browsing source trees online via github, google code, etc.

[1] https://addons.mozilla.org/en-US/firefox/addon/tree-style-ta...


I combine "Tree Style Tabs" with the Tab Group[1] feature (added in FF4 I believe) instead of using a separate window for each class of tabs that I'm viewing. Those 2 combined with the "Pin as App Tab" option for Gmail and a couple of my control panels makes for a pretty efficient setup usability wise.

I really would love to see memory efficiency improve. I restarted FF yesterday and I'm already at 2.22 GB. It would be great to be able to set a ceiling on the amount of RAM FF is able to get its greedy little hands on. My iMac has 16GB, and I've seen FF reach half of that before when running a big Flash based web app with a hundred or so other tabs open. My little MacBook Air only has 4GB, so being able to tell FF to grab no more than 1GB or so would be fantastic!

[1] http://support.mozilla.com/en-US/kb/what-are-tab-groups


Vertical tab management is far superior when managing a bunch of tabs. I am not sure how anyone who has more than a handful of tabs can get by horizontally, not sure how people can tell tabs apart when only seeing the favicon & a few characters of the title. What with widescreen displays being the norm now it just makes sense to do vertical tabs.


I use a 1920x1200 monitor rotated 90 degrees. So, while it is technically a widescreen display, it doesn't quite work like one.


I've got six virtual desktops with two monitors. When I'm doing web development, I have one window per screen, which usually means one window of tabs connected to my dev server, and one window of tabs for each framework/language I'm working with. For example, I was working on a WordPress plugin with JQuery, so I had a dozen tabs open on the WordPress function reference, and another dozen tabs open with JQuery stuff. Then I've got a virtual desktop with my email on one screen and Hacker News, etc. on the other one.

Finally I have two blank desktops that tend to get eaten up by tabs that I use when people come into my office asking questions that I don't know the precise answer to off the top of my head.

But yes, on a single desktop about 12 tabs is my limit. And when I get over 4 full browser windows I start to get antsy and know that I can't possibly keep focused on everything I'm doing.


> Finally I have two blank desktops that tend to get eaten up by tabs that I use when people come into my office asking questions that I don't know the precise answer to off the top of my head.

Why do you keep the tabs open after you've answered their question?


I'm in a remote area with limited Internet - 364 kbps down 128 kbps up shared among 20-30 office workers and over 100 residents. My computer can handle keeping tabs open in case I didn't properly solve the problem before, or if something similar crops up.

So, I have a lot of reference materials open on my desk, and I keep them open because finding the page I was on takes a long time, and loading that page takes even longer.


I've used Firefox under similar conditions.

Some people might not know that it actually includes a feature specifically for this use case. If you start to type in a URL or page name similar to one already open in a tab, the awesomebar dropdown menu lets you jump to the already-opened tab.


That feature is actually broken on Ubuntu 10.10 / standard Gnome with multiple desktops - it tries to switch you to the appropriate tab but can't switch you to the appropriate desktop.

And I'm not sure I really like it anyway - when I re-type a URL I'm usually looking to reload it to grab a fresh copy. I tab-complete the address of my development server and Hacker News very often; anything else I don't usually know the URL off the top of my head, I just remember that I have such and such doc on such and such desktop.


You can also prefix your URL/page title search string with '% ' to exclusively search open tabs :)

eg: % Firefox 7 memory


Happen to know where you can find out shortcuts like those? I had no idea it was there.



HTTP Proxy?


It's on my to-do list. (After implementing a disaster recovery plan, cleaning up after an intrusion, and a half a dozen more important things.)

Meantime being careful about what I close does a decent job, and I don't have to maintain a proxy server.


Hint: use multiple windows.

One window with few tabs is for programming to-reads, second windows - with sites from searching for some item to buy, third - with stock information, etc. This way accumulating 100+ tabs is really not a big deal and it still remains manageable. Until FF crashes or, worse yet, grinds to a halt that is. "We are sorry, it is so embarrasing" it would say on a restart and then get herniated again trying to open all these tabs AT ONCE. Poor thing.


I am a tab hoarder also but personally i'm quite impressed at the speed and responsiveness of FF when restarting with 100-or-so tabs.


Yeah, I know, I should take my question to Stack Overflow, but does anyone know how to configure FF to not try to reopen tabs after a crash? (Takes a long time on my old machine.)


Well, Superuser, not Stack Overflow.

Go to about:config and set browser.sessionstore.resume_from_crash to false.

http://kb.mozillazine.org/Browser.sessionstore.resume_from_c...


That does what I want. Thanks.


In about:config, change browser.sessionstore.resume_from_crash.


A while back I remember using an extension that would restore all of your previous tabs on start up, but not actually load them until you clicked on them. It fixed the situation you describe, but sadly it looks like it no longer works with the current version of Firefox.


This is default behavior as of Firefox 4. When you launch a new browser, the (default) home page has a "restore last session" button.


you could also try using the session manager add-on. I find it pretty handy for when FF crashes with 20+ tabs open in the HN tree, another 10 or so in whatever google search tree I have open, and some other miscellaneous tabs.


I always have tons of tabs open. I have 25 open at the moment.

Usually, I'll have about half a dozen windows open with about half a dozen tabs each. I group the tabs together so that each window holds similar tabs, so it's not really 30 things I'm keeping track of but more like 5-6. E.g. right now I have one window where I was checking finance related news, stock quotes, etc. One window with a bug report and several tabs open looking at relevant source code and google searches related to investigating the problem. I've got one window that's my mail. I've got one window with a few HN stories open.


as a potentially different use case, I use my tabs as a stack for reading things (where I push a link when I see it), and will then read through them all in a serial fashion, closing things I'm 'done' with. this generally leads to me having reference and 'to read' tabs open, in addition to things I like to have on hand (i.e. emails, workflowy, HN). this generally adds up to 15-20 tabs in my main window on average, going up to as much as 30-40.


I use Pentadactyl (formerly Vimperator), and hide the tab bar entirely. 'Number of tabs' then becomes pretty meaningless, as all tab-switching is based on a history stack and regular expressions (a la Emacs buffers), so one just lets the buffer list grow. I only notice when there's a noticeable slowdown (which on this Core i7 with 3GiB RAM starts around 180 tabs).


I use a firefox treetabs plugin that makes trees of tabs vertically on the left side of the monitor. ive had about 50-60 tabs/window with 3 windows open before, while running firebug. With that many on firefox 3/4 it was crashing if I ran it overnight, but it does seem to be improving now. Hopefully 7 will be a dramatic improvement.


> Chrome becomes very unhappy under such circumstances (since it uses about ~100 MiB per tab)

You must be looking at very media heavy sites, then. Looking at Chrome's task manager (shift-escape opens it), my per-tab memory usage ranges between ~2.4MB (HN pages) to ~44MB (a youtube video). The root process is using 120MB, GPU process 50MB, and Flash 94MB. So, in total, for 20 tabs I'm using 545MB, or 27.25MB/tab. A far cry from "~100 MiB per tab".

Note that I'm on Windows 7 x64; while you may be entirely correct about Chrome on your platform of choice, it sounds like FUD to me.


Linux 2.6.38 x86_64, one window, 4 tabs:

    VIRT  RES  SHR S %CPU %MEM    TIME+  COMMAND                                                                                                              
    685m 110m  25m S    2  2.8   0:29.09 /opt/google/chrome/chrome                                                                                            
    905m  74m  14m S    0  1.9   3:55.19 /opt/google/chrome/chrome --type=renderer --lang=en-US --force-fieldtest=ConnCountImpact/conn_count_6/ConnnectBackupJ
    879m  63m  16m S    0  1.6   0:02.95 /opt/google/chrome/chrome --type=renderer --lang=en-US --force-fieldtest=ConnCountImpact/conn_count_6/ConnnectBackupJ
    889m  57m  15m S    0  1.5   0:08.17 /opt/google/chrome/chrome --type=renderer --lang=en-US --force-fieldtest=ConnCountImpact/conn_count_6/ConnnectBackupJ
    872m  46m  15m S    0  1.2   0:05.67 /opt/google/chrome/chrome --type=renderer --lang=en-US --force-fieldtest=ConnCountImpact/conn_count_6/ConnnectBackupJ
    866m  36m  12m S    0  0.9   0:10.46 /opt/google/chrome/chrome --type=extension --lang=en-US --force-fieldtest=ConnCountImpact/conn_count_6/ConnnectBackup
    850m  23m  11m S    2  0.6   0:19.67 /opt/google/chrome/chrome --type=extension --lang=en-US --force-fieldtest=ConnCountImpact/conn_count_6/ConnnectBackup
    267m  13m 7100 S    0  0.4   0:00.05 /opt/google/chrome/chrome --type=zygote                                                                              
    222m 9000 2084 S    0  0.2   0:00.92 /opt/google/chrome/chrome


Did they make Firefox re-entrant so that a f'd up page in one tab doesn't affect all the other ones and the browser chrome?


Either you're incredibly involved in the Mozilla codebase, or you're misusing the word "re-entrant" [1]. Since you're asking about development status, I'm going to assume the latter.

[1] http://en.wikipedia.org/wiki/Reentrant_(subroutine)


Forgive me if I've completely misunderstood how GUIs work, but isn't reentrancy a basic requirement for GUIs in multi-threaded applications to be responsive when one thread of execution is blocked?

I mean, I guess they could use a message queue between their thread for window chrome and page rendering, but I don't recall them ever mentioning anything about that in any dev journals that I used to read years ago.


You often see the same pattern with OS.

  User4,27,128: "I think there might be an issue."
  Fanboy37,652: "What are you talking about? This is the best thing ever!!!"  
  Fanboy23,418: "That easy to fix, just type everything backward while singing and it all works fine!!1!"
  ...
  Dev15: "Fixed problem 4,129"
  Fanboy37,652: "Now that that's fixed, this is the best thing ever!!1!"


As long as the devs stay sane it's not too much of a problem.


Users might have some issues finding help on their problems though.


> we usually see a bunch of people coming out

None of whom are actually active Firefox or Gecko developers...

In other words, fanboys act like fanboys. Surprise!


That's interesting.

Because every time I've seen Mozilla developers making note of memory improvements over the last few years, I run into someone claiming that every time "Firefox" and "memory usage" came up prior to whichever is current for the time, the developers steadfastly denied a problem.

It's getting a bit like the mythical proslytizing vegan; I've run into far more people bitching about however many instances of fuss-making by however many hostile vegans than I have of actual hostile vegans. (The count of the latter can be described as "basically none".)


for me it wasn't developers specifically, it was just vocal users. i've not seen much from mozdevs at all contemporaneously with the discussions.


> deny there's a problem, fix it, then promote how great your fix is

I can't think of a way this can be construed as an indictment against vocal users, or really, anyone except the developers (or marketing or management from the same organization).


Challenges?


It's not that Firefox is actually using that much memory. It's not even that it has a memory leak in the usual sense of a broken garbage collector or something. It all down to memory fragmentation. You can see illustrations of browser memory fragmentation here: http://blog.pavlov.net/2007/11/10/memory-fragmentation/ Firefox switched to jemalloc in 2008, which cut memory usage to less than half. http://blog.pavlov.net/2008/03/11/firefox-3-memory-usage/


Many of the Firefox 7 fixes that reduced memory usage did not have to do with fragmentation; there were a number of true memory leaks fixed, and other bugs where code was allocating more memory than it ever could need.

(For example, I think there was a bug where the find-as-you-type bar could keep the page in memory forever if it wasn't dismissed.)


That's correct, but the big fix people are talking about was a fragmentation fix.

https://bugzilla.mozilla.org/show_bug.cgi?id=666058#c31


Since when has Firefox/Mozilla NOT promised that their next release will manage memory better?


They've started getting more serious about it. One of their big new JavaScript performance features, type inference, was backed out as soon as they realized it causes significantly increased memory usage -- and it won't get back in until it slims down, despite significant JS performance benefits. In the past, many features slipped in with memory problems and weren't noticed for months or years.


Umm, the claim wasn't speculative, it was measured on an aurora release that you can test out right now: http://www.mozilla.com/en-US/firefox/channel.


I smirked at the headline when I saw it and I came here to say the same thing ... Every release they promise that firefox will use less memory ... hasn't happened yet AFAIK.


The Aurora channel, which is the code that will soon become Firefox 7, has some pretty big memory improvements.

Nicholas Nethercote is leading Firefox's memshrink effort and shared the results so far: http://blog.mozilla.com/nnethercote/2011/08/09/firefox-7-is-...


I have switched to Firefox 8 nightly 64 bit 2 week and never turned back to stable release.

Firefox 8 is current state is performing an order of magnitude better than the current stable release.

They are definitely improving at an escalating pace ever since chrome and safari started eating into their market share.


There's something inherently wrong about the headline of this. How did they get to such a high usage in the first place? They sacrificed performance for features, and now going back to clean up the mess. Not elegant. This is why I'm sticking with Chrome.


I left firefox once and for all this week. its too bad, i like what the they are working with identity built into the browser.


Chrome/ChromeOS/Chromium(OS) is working on identity built in to the browser as well via multiple profiles:

http://www.chromium.org/user-experience/multi-profiles


Can anyone explain why the explicit memory metrics apparently regress between Firefox 7 and Firefox 8?


A bug in how they were counted in FF7:

https://bugzilla.mozilla.org/show_bug.cgi?id=673851


"up to 50% less"? That is a major weasel statement. It could use 1% less and still meet the "goal".


I think you misunderstood -- it's not a goal but a measurement.

The actual statement, if you read the original source[1], is

>Firefox 7 uses less memory than Firefox 6 (and 5 and 4): often 20% to 30% less, and sometimes as much as 50% less.

[1] http://blog.mozilla.com/nnethercote/2011/08/09/firefox-7-is-...


Could someone help identify why Firefox saves and keeps such a ridiculous number of Cache folders in \\Application Data\...\Profiles\... They're all 0, 1, 2...and then 01, 0A, 0B. I mean, what's the point here?


Filesystem performance tends to degrade when you have tens of thousands of files in a single directory, so programs that manage thousands of files usually end up dividing them into many subdirectories. It's not just Firefox - git uses the same strategy, for example.


Memory is cheap. High UI latency and cross-browser crashes aren't. Sorry.


Some people run other apps alongside Firefox and some of those apps also want to provide low UI latency.


"Memory is cheap."

Please leave this field.


Paging isn't cheap; neither are cache misses.


This version inflation thing is getting a bit out of hand...I'm using Firefox 5 right now, I don't feel any difference from Firefox 4.


I'm using Firefox 5 right now, I don't feel any difference from Firefox 4.

That's exactly the point. Which version of Gmail are we on right now? 477? Does that feel different from 476? I don't know. I just get performance improvements and new features as they come out.


The problem with using that metric is that the "feel" of a program is directly related to the UI changes that the version employs. You could change absolutely nothing bug and feature wise, but do a UI redesign and the new version would feel like it was updated a whole bunch.


What's wrong with subversion system for bug fixes? So, you mean they fixed so many bugs, improved so many back-end features in Firefox 4, which perfectly justifies a version jump from 4 to 7? I seem to remember old days Firefox 2 to Firefox 3 took forever...


They're not jumping from 4 to 7. 5 has been released; 6 will be released soon; 7 will be released six weeks after that. It's a time-based schedule with a new version number every six weeks.

Mozilla was sick of defining features for a given version and then delaying releases for months because of too-ambitious goals, so they switched to a whatever-is-done-by-the-deadline system. Version numbers aren't particularly meaningful.


Which is why I like Ubuntu's YY.MM versioning - it's completely natural and expected.

I also like build numbers like Microsoft and Apple give, you know if OSX 10.7 GM seed is different from the GA release by looking at the build (e.g. 11A494A)


Clearly, they are pulling the old "major version change marketing stunt" to catch up with a perceived lag in version numbers compared to other browsers. You see, apparently people think IE 9 must be vastly superior to FF 4...

Personally, I think the time for version numbers should probably be over altogether. At this point I feel it's more productive to just tack a date string onto the thing and be done with it. For example, Firefox 2011-July is way more informative than an actual version number.


Did you read Mozilla's version number announcement a few months back? Version numbers aren't being used in marketing material anymore, so the user will rarely see them. The change in the version numbering corresponds to a new rapid release/update cycle. From the user's perspective, there are no versions, there is just Firefox.


I didn't read it, no. But looking at the website and the actual Firefox app right now, version numbers are still a big part of the picture. A release cycle doesn't become more rapid just because they're using major version numbers in place of minor ones. I get and support the idea behind a rapid release mechanism instead of holding back a release in order to wait on incomplete features, but still this version number thing seems like a stunt to me that has little to do with the actual release policy.


We're on "Chrome 13" if that means anything. It shouldn't make a difference as long as major release numbers correspond to major improvements.


and why do you care?


Well, even with that it won't be comparable to Chrome I'm afraid. Firefox became very heavy suring the years. And no I don't have a lot of add-ons; I have 2 addons in FF and 15 addons in Chrome and yet Chrome processes suck much less memory even if i run it for days without closing. People switching to Chrome is not just PR, really.


Well, one thing is that Chrome extensions are much more limited; also, they only even run when you let them.


Still, Chrome eats less memory than FF with 1-2 extensions (Firebug - very often disabled, and a FB addon). How can you argue against that? Just accept the fact that FF got issues.


I'm using Firefox 5.0.1, I just clicked "Check for updates" and it said I'm up-to-date.

Shouldn't 6 come out first? Isn't it too early to talk about 7?

I think this is bad marketing from Mozilla, they're totally confusing people.


6 = current beta, will become release in 1-2 weeks 7 = current alpha (Aurora), will become beta when beta gets released 8 = current nightly, will become Aurora when...you get the point

So basically Firefox 6, 7 and 8 have already "come out" and you can use them if you're willing to run beta or alpha software. (In my experience, Aurora is already very stable, much more so than normal alpha software) The versions advance in a 6 weeks cycle.

I'm guessing the above has been explained about 1000 times when Firefox 5 came out soon after 4, anyway.


Firefox 7 isn't even a real release. You'll have to wait for 8. The new versioning system uses the Fibonacci sequence, so that after 8, the next "real" release will be 13, and then 21 etc. This is why you're currently stuck on 5.


Satire much?


Mozilla isn't marketing anything here. A journalist dug up information from a personal blog and the developer wiki.


The problem is that those charts comparing memory usage all refer to future versions, so I have no idea how it'll compare to 5, the current version that I need to restart every 3 days to clean its memory usage.


I think Firefox is trying to adopt the Chrome model, which is that version numbers are for the developers only. End users shouldn't need to know which version they're running.


except for when things go wrong and they just say "I'm using firefox and your site is broken".


and then you say "well, is your firefox updated?"

no more of this "i'm going to stick with version 3.6 for now because i prefer that" nonsense. there is only up-to-date and outdated. yeah, it's a subtle and mostly psychological difference, but it is a difference.


and then they respond with 1001 reasons why they can't update (security restrictions, corporate policies, etc).

There has to be a line drawn - where do you draw it? If 5.0.1 came out yesterday, do you not support someone who is running 4.8 which came out 3 weeks ago?


they respond with 1001 reasons why they can't update, you come back with "well that's too bad". the only way to change people's attitudes toward browser updates is to not tolerate outdated software. if we keep accommodating crappy IT departments, things will never change.


If all browsers adopt the auto-updating model, that becomes less of a problem.


I'm not sure how much you're joking, but Mozilla is releasing 3 versions at a time. Release, Beta, and Aurora. Right now, Release is on version 5, Beta is 6, Aurora is 7. You can get them from http://www.mozilla.com/en-US/firefox/channel/


You can pick the upcoming releases (beta, currently v6, or Aurora, currently v7) at:

http://www.mozilla.com/en-US/firefox/channel/


Agreed. And in those charts, a view of Firefox 8 puts the memory back up a bit. A quick look makes it feel like two steps forward, one step back.


http://blargon7.com/2011/07/endurance-tests-demonstrate-fire...

Update: It appears that the explicit memory calculated for Firefox 7 on Mac was artificially low. This explains the slight increase in Firefox 8. If you’re interested you can read further details on Bugzilla.

https://bugzilla.mozilla.org/show_bug.cgi?id=673851


For better or worse, that's how open source works. You can't really control the message by keeping future versions secret.


I don't know what everyone is complaining about, whenever I want to open a few more tabs I just purchase a couple more gigs of ram, problem solved, bunch of whiners!


There are hundreds of better ways to pack & deliver your sarcasm.


Yeah? For example?




Consider applying for YC's Spring batch! Applications are open till Feb 11.

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: