

Fixes to memory footprint and garbage collection arrive in Firefox 7 - mrseb
http://www.extremetech.com/internet/88998-fixes-to-memory-footprint-land-in-firefox-7

======
sedev
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.

~~~
tomp
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.

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

------
mbrubeck
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/>

~~~
mrseb
Thanks, I'll put that into the story.

------
bstar
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.

~~~
beck5
Is FB better than chrome dev tools?

~~~
MattJ100
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...

------
azakai
> 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.

------
brohee
<https://bugzilla.mozilla.org/show_bug.cgi?id=666058#c31> /
<http://news.ycombinator.com/item?id=2728706>

------
jes5199
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.

------
flocial
" 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.

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

Panorama and GPU acceleration for Firefox 4 come to mind.

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

~~~
wmeredith
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.

~~~
jonknee
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.

~~~
LukeShu
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.

~~~
jonknee
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).

------
Silhouette
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.

~~~
wh-uws
Totally agree with you but this particular one isn't vaporware

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

~~~
Silhouette
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.

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

~~~
Silhouette
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?

~~~
rpearl
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.

~~~
Silhouette
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.

------
swindsor
Also coming in Firefox 7: The number 7.

------
executive
Too little, too late. Chrome has already won.

