

Generational GC has landed in Firefox - dbaupp
https://blog.mozilla.org/nnethercote/2014/03/31/generational-gc-has-landed/

======
parley
Great work! Personally, I really hope Project Electrolysis will be successful,
for both security and performance reasons.
[https://wiki.mozilla.org/Electrolysis](https://wiki.mozilla.org/Electrolysis)

~~~
cpeterso
You can test Electrolysis (e10s) in Firefox's Nightly channel. Use the File >
New e10s Window command. Firefox can run e10s and non-e10s windows at the same
time, so I use an e10s window by default and when I run into an e10s problem,
I open a non-e10s window as a workaround. If you are using Linux or Windows,
you may need to set the "layers.offmainthreadcomposition.enabled" about:config
pref, but the "New e10s Window" command will open a dialog box to tell you if
your computer needs this pref.

~~~
parley
Since I believe I may have the project managers attention for a brief moment,
I might be so bold as to ask a few questions :)

* In the e10s-addon-docs etherpad, it says that you expect a solid browser (ignoring addons) in Q2 and then with complete addon support in Q4. Is this still the plan?

* Will e10s include a task manager for e.g. identifying resource heavy tabs? I couldn't see anything about it in the GDoc backlog spreadsheet.

Thanks for your hard work on this project! I know many who are rooting for its
success.

~~~
cpeterso
End of Q2 for a usable browser and end of Q4 for good addon support is still
roughly correct. We are adding more Firefox engineers to e10s, so things are
looking up. :)

The work to implement a tab task manager is tracked in
[https://bugzil.la/515352](https://bugzil.la/515352). This is a lower priority
because it's not strictly necessary for basic sandbox functionality. Also,
e10s currently runs all tabs in one sandbox process. This gets us sandbox
security and jank-free UI without much memory overhead. We will eventually
ship 1:1 or M:N tabs per sandbox processes.

~~~
silon3
I tried the e10s nightlies and it seems to be quite usable.

The major issues is some tab confusion (phantom, unclickable tabs), many "new
tab" after session restore and occasional problems with context menus. I did
use Tree style tabs and some other non-content related plugins and they mostly
work.

------
AndrewDucker
Another great step along the way towards a compacting GC.

I wonder how much more memory can actually be saved in Firefox.

~~~
ksec
Does it matter? At first we wanted GGC, or CGGC because we want Firefox to be
Snappy. We wanted Project Async because we want it to be Snappy.

But after all the bugfixes and everything Firefox is still no snappy. And they
landed that Hideous Australis UI.

~~~
616c
I know Mozilla cannot please everyone, and I understand you are probably not
going to change your convictions, but I think your attitude towards this
browser and their work is pretty rude.

Mozilla, fighting against a current to open source the only proprietary
competition to Internet Explorer in its day, has spent over a decade improving
a lot of old, ugly code, and making not just a good (maybe not great to you,
even if it is to me; I will try to word it fairly) browser, but a spate of
technological advances and solid policy positions.

Chrome and Google might be the new hotness, but I respect how much Mozilla has
done with Firefox, and how they take their time to make the right choices (to
them, you might not agree; that is ok).

And if you think moving the whole underlying architecture of a widely
distributed browser is an easier milestone than changing a skin that runs an
easily prototyped UI in Javascript (XULRunner), I strongly encourage you to
download the source, read the very solid documentation, talk to the community,
and compile.

I know your attitude re Firefox is commonplace, but as a younger hacker I am
disappointed how people think their more-than-a-decade long project to build a
browser is just not fast enough.

Now only if they would get their crap together with the X11 server ...

(Yes, that was a joke, just to be clear.)

~~~
Karunamon
I can't actually use Firefox because of two very annoying problems.

* Hitching and lagging coinciding with dumping tons of garbage into my syslog [1]

* A _six year old_ bug whereby duplicate SSL certs result in a page not being able to be viewed. No override, no nothing. [2]

Meanwhile, the Chrome UI is minimal but fast, and doesn't seem to have fallen
victim to the "redesign for redesign's sake" that seems to be plaguing many
open source projects (Australis is downright ghastly), my required plugins
work without the lag, and bugs that hamper basic functionality don't sit
around unfixed for half a decade! Or even a _full_ decade in some cases!! [3]

Maybe I sound entitled, but that second bug in particular is downright
_infuriating_ (HP iLO simply cannot be used), and the fact that it's been
sitting untouched has unfortunate implications for the dev culture at Mozilla.
And don't say it's been forgotten about in a backlog either - read the history
and you'll see instances of tickets being marked a duplicate of this one, so
the awareness is there.

Firefox may be an amazing hammer, but I can't use it and can't recommend
anybody else does either until it stops embedding splinters in my hands.

[1] [https://support.mozilla.org/en-
US/questions/984296](https://support.mozilla.org/en-US/questions/984296)

[2]
[https://bugzilla.mozilla.org/show_bug.cgi?id=435013#c15](https://bugzilla.mozilla.org/show_bug.cgi?id=435013#c15)

[3]
[https://bugzilla.mozilla.org/show_bug.cgi?id=435013](https://bugzilla.mozilla.org/show_bug.cgi?id=435013)

Huh, first time I've ever been downvoted for saying that bugs suck.

~~~
voltagex_
There's a lot of noise on that bug but not a lot of action for 3 years now. Is
there any kind of escalation process you (and others) could use?

~~~
Karunamon
If there is, I'm not aware of it.

------
AshleysBrain
Great! This should be useful for games to help reduce GC-invoked pauses.

~~~
confluence
Performant games never release their memory, so they should never get paused
by the GC.

~~~
kevingadd
False. Do you mean that performant games tend not to allocate each frame? That
is generally true. Performant games very certainly do release memory, though
their allocation patterns tend to vary - lots of modern games actually use a
garbage collector of some sort, whether it's for lua scripts or for larger
parts of the game code. Sometimes their GC is a weak form of refcounting,
sometimes it's a conservative stack-scanning GC, sometimes it's a precise one.

Lots of modern 'performant' games are written in Java or C# and in those cases
too, you have a GC and occasional allocation/freeing of memory, however they
do tend to make an effort not to allocate from frame to frame or allocate
temporary objects.

For console games it's definitely false that they don't release memory; memory
usage has to be precisely controlled on console so subsystems that don't
happen to be using memory at the moment are definitely not holding onto it -
that memory's being used for something else.

~~~
azth
> Lots of modern 'performant' games are written in Java or C# and in those
> cases too...

I keep wondering whether it is possible to write a game like BattleField4 or
Crysis in Java/C#/etc. Do you have any insights on this issue?

~~~
yoklov
It's probably possible, but it's not really worthwhile.

In the best case scenerio, it's the same amount of work as writing one in C++.
The benefits and nice features of those languages would cancel out the
drawback of lack of control.

In the worse case, the lack of control means you can't use the features of
those languages which would make development easier, and you'd miss C++'s low
level features which have no equivalent in higher level languages.

Since the reality is somewhere between these (in my experience, it's pretty
close to the worse case), and implementing a high performance game engine is
such a large task, it's a much better engineering decision to just go with C++
(or another language which allows a similar level of control) from the start.

------
agumonkey
Subjectively Nightly is close to Chrome fast in terms of UI and page first
render. Other loads like maps.google.com don't seem to improve. But anyway
that seems like an important step.

~~~
emn13
Notably that's a prime google web property, and I don't doubt that they made
sure that it's snappy on chrome - which says more about google maps than about
chrome, in all likelihood.

For comparison, on my machine maps.bing.com is about as fast in FF as in
chrome (panning around is about as snappy), whereas IE11 is much faster (it's
a little snappier in gmaps too).

In other words: IE on bing does notably better than IE on google; and chrome
on google does noticably better than chrom on bing. It's not hugely surprising
- all three browsers can be quite snappy if you profile and ensure you miss
various slow paths, and of course MS + google make sure their mapping services
work well in their own browser.

------
Ygg2
Great work guys. Hopefully it was or will be worth it. Best of luck :D

