Hacker News new | past | comments | ask | show | jobs | submit login
Fixes to memory footprint and garbage collection arrive in Firefox 7 (extremetech.com)
86 points by mrseb on July 5, 2011 | hide | past | favorite | 42 comments



While the improvements they're promising are certainly a Good Thing, one bit jumps out at me:

"introduced a significantly improved about:memory page with buttons that can manually trigger garbage collection (GC) and cycle collection (CC)... hitting these buttons repeatedly — or by hitting “Minimize memory usage”, which triggers both processes three times in a row — you can reduce Firefox 6′s memory footprint significantly."

Really? Really, guys? That is a wincingly strong code smell. Why is it necessary to press the button more than once? Why is it necessary to press the button at all? I appreciate that it's hard to get all of this working correctly, but that's a clunker of a design - it tells me that this feature does not actually work, but instead kinda-sorta-maybe works. Something like that should, pardon the cliché, Just Work - it is way out of the scope of things you should have to care about while browsing.


If you had read the bug report and the discussion below it, you'd know that chunks of virtual memory (VM) are not freed to the OS immediately after they are empty, but are only freed after 3 GCs. That's actually an optimization; allocating VM is expensive, and doing it just after you've freed some is plain stupid.

The problem with GCs is not that they don't actually work, it's that they are suited to a specific task. If the user is surfing the web and constantly opening/reloading pages, then GC will be ok. However, if you close most of your tabs and only leave a few open, then you might have to tell the computer that you won't be needing more memory soon and that it's welcome to free as much VM as possible. That's what those buttons are for.


Thank you for that clarification. That has improved my understanding of the situation.


After 20 seconds the browser perform this "idle-cleanup" for you and there is no need to press this button all the time if you want to minimize memory usage.


I think these buttons are intended for debugging. Normal users don't hang around about:memory. (This area isn't exposed in the UI anywhere.)


Nicholas Nethercote's blog has more technical details about the work he and others are doing to measure and optimize memory use in Firefox: http://blog.mozilla.com/nnethercote/category/memshrink/


Thanks, I'll put that into the story.


They should have been working on these issues a long time ago. I think they are far more important than many of the new features that came with v5. The only thing holding many of us back from using FF is the memory issue. Good thing the FB debugger is so awesome, because that's the only thing that keeps bringing me back at this point.


You imply there is a direct choice between working on one feature vs another. In reality not everyone can work on every aspect of a project. Plus it's a free software project. Contributors will work on whatever is important to them/their company.


Amusingly enough, Firebug has significant memory usage/leak issues and most users are much better off using it in another profile to keep down memory usage.


So true. Getting the speed up again is a major feature, it can't be delayed so long. FF4 already disappointed a lot in actually working a lot slower (on my machines, at least). So slow that I had to switch to Chrome, actually.

I didn't know what went wrong in their meetings, but not focusing on speed definitely was one of the worst decisions, they could have made. I hope they don't continue making big mistakes like that.


Is FB better than chrome dev tools?


I use both. I find that sometimes one or the other will display some weird traceback, or worse, silently fail. Now my first reaction to a problem that isn't obvious is to switch debugger.

Sadly I think the world of Javascript debugging still has some way to go...


For me FB is better for prototypin code. You have the expanded console that allows me to write code quickly on pages that I may not have direct access to (like production pages). I feel like I'm using a text editor. Webkit debugger is much more limited in this regard.


IMO, yes. Maybe it's that I was on Chromium on GNU/Linux, and not Chrome proper, but I found the chrome dev tools to be buggy, and a little incomplete, like as-of-yet unpolished FB clone.


> Firefox 5 was all about bug stomping and the stillborn channel switcher, Firefox 6 will see the addition of lots of HTML5 and CSS3 features and more privacy controls, and Firefox 7 — at long last — will focus on memory management and performance increases.

This kind of summary is potentially misleading. It isn't like there is a preplanned 'theme' for each release, or that everybody focuses on one thing each time then switches to something else.

Mozilla constantly focuses on several things at once. So there are memory improvements in FF5 and FF6, not just FF7. It isn't as if until FF7 no one cared about memory, which the summary almost implies. (But, it's possible the memory improvements in FF7 are turning out to be bigger than previous ones.)

I realize the article was just doing a quick summary and there's nothing wrong with that. Just wanted to post this comment to avoid possible misunderstandings.



You know, I have a lot of RAM in my laptop, but Firefox - even the latest release - still gradually slows down over the course of a single day. If I leave it running over night, my whole system becomes sluggish, every keypress takes visible time to render a character. I was pretty disappointed when I had to leave my perfectly configured Firefox behind to switch to Chrome, but the thing is just so much more stable.


" As we all know, Chrome isn’t actually a whole lot faster than Firefox, it just feels snappier — something Mozilla no doubt wants to emulate."

I'm glad they're focusing on memory. Better late than never but I see frequent claims similar to these that Chrome isn't that much better or might have a slight advantage which we will catch up soon, blah blah blah.

C'mon guys. When's the last time Firefox put Chrome on the offensive. Playing catchup leaves you several steps behind. When FF7 rolls out next month or whenever this new release cycle comes Chrome might be even faster and snappier.

I still remember when I switched from IE to FF. It was faster, lighter and had more innovative features. Suddenly the web got more exciting. It's the same feeling I had using Chrome only they never dipped below that initial experience.

FF right now is like Elvis' jumpsuit era. Out of shape, lost, struggling with identity, and now about to go on Celebrity Fit Club.

FF is still my primary browser but only for the extensions.


"C'mon guys. When's the last time Firefox put Chrome on the offensive."

Panorama and GPU acceleration for Firefox 4 come to mind.


I can't believe I just got called a "mom and pop beige-box surfer"...


I'll second that. Considering I work at an online development agency and only have 4GB of ram in my work machine, I'd say the author is a bit out of touch. This is most definitely an issue for me.


You have twice as much RAM as the people he was speaking of. I'd say 2GB is pretty low these days, glancing at Dell.com even the $499 entry level laptops are shipping with 4GB.


Wow... My laptop that I do most of my work on is packing 1GB. I guess I have had it for 4? 5? years. Of course, using things like wmii and Emacs help keep my memory usage down, but Firefox is making that harder.


RAM is cheap, is there a reason you haven't upgraded? My laptop has 8GB and it comes in handy quite a bit (for virtual machines especially).


768MB here, any help apps can give in keeping themselves lean is good.


Same here, 768Mb RAM on a 7-year-old Thinkpad X40 (only 3 pounds with a 12" screen).


I thought about throwing 'silver' in before the 'surfer', but now I'm glad I didn't.


PLEASE can we not start posting every vapourware announcement from Google and Mozilla now that they are doing browser releases every few weeks? This sort of change might be interesting if it was actually available in a production build today, as the title half-suggests it is unless you know that Firefox 7 is still months away. Do we really want the HN home page to become a stream of dev feature announcements, though? Even Slashdot moved away from doing that.


Accusations of vapourware and 6-weekly release schedules with developer/aurora channels don't really seem to fit together in my mind, in fact they seem diametrically opposed.


Totally agree with you but this particular one isn't vaporware

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


IMHO, it's vapourware until it's shipped. The software world is full of projects, large and small, that were definitely going to be in the next release for sure, except when they weren't. If you've got release cycles that short, nothing is certain until real people can use it.

In any case, whatever we call as-yet-unreleased features, my views on turning HN into a running commentary on the dev process for submitters' pet projects stand.


It'll ship in the nightly tomorrow... I guess Real People will be able to use it then.


And how many real people are going to switch browsers from whatever they're using now to Firefox nightlies because of some fixes to stuff that isn't broken on most other browsers anyway? If the answer is not "lots", why is this on HN today?


The point is that... the patch is already in the nightly builds, and thus will certainly make it into beta and release builds (even if it requires additional patches on top). So your objection to this being vaporware is simply ridiculous.


Right there, in the very first sentence of the article we're discussing, there's a reference to the channel switcher, which was pulled at the last minute from Firefox 5 having been in the dev builds for a while.

Moreover, as I mentioned before, the software world is full of examples of this on all scales. Windows Vista lost most of its headline features before it finally shipped, after months of building up expectations by Microsoft. No project is magically immune to this possibility.

Your claim about the certainty of shipping something because a test version was integrated into a dev build is simply wrong, and that is why I use terms like "vapourware" and why I think this sort of discussion is premature for HN.

Anyway, enough of the meta.


It'll also ship this week to around 100,000 users who are already on the Aurora channel, and in just six weeks to literally millions of users on the beta channel.

Firefox is an open source project. Part of our mission is to enable participation by the community, and that requires doing our work in the open and talking about it in public.


> Part of our mission is to enable participation by the community, and that requires doing our work in the open and talking about it in public.

I completely respect that, and I have nothing against your philosophy whatsoever.

However, I assume that Mozilla provides those who prefer to stay up to date using the dev builds with information about significant releases via other channels. Moreover, while Firefox obviously has impressive numbers of people who do stay at the bleeding edge, is that not still only a small proportion of the total user base?

If HN winds up being that channel for every major OSS project that a few HN readers use, it will look like Slashdot a few years ago -- that is, the Slashdot that many people abandoned for a while. All I'm asking is that we leave specialised discussions about in-development features to more appropriate forums, and keep HN to mainstream announcements of wider interest (such as when an important feature actually makes it into a production build of a major product) if we're going to have feature announcements at all.

Given how often my original post has been both up- and down-voted, this seems to be a fairly polarising view, however.


This is Hacker News, not End User News.


I care more about 'web professionals' than 'real people' switching. This article made it likely I'll switch to the now-available early Firefox 6 versions, just to do the manual about:memory 'minimize memory usage' trick, even before Firefox 7 arrives in any form. Giant footprint and mysterious GC pauses in Firefox have been driving me to use Chrome more and more; this might reverse that trend.

Personally, this is big enough news I'm happy to see it (even in a couple different forms) on HN.


Also coming in Firefox 7: The number 7.


Too little, too late. Chrome has already won.




Join us for AI Startup School this June 16-17 in San Francisco!

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

Search: