Hacker News new | past | comments | ask | show | jobs | submit login
Generational GC has landed in Firefox (blog.mozilla.org)
206 points by dbaupp on Mar 31, 2014 | hide | past | web | favorite | 48 comments



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


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.


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.


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


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.


Another great step along the way towards a compacting GC.

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


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.


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


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

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

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

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


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?


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


When Chrome is more than 10 years old I bet they'll have decade-old bugs.


I wonder how many of those will affect basic functionality and not have a realistic workaround.

I mean, we're not talking about something taking a couple of extra clicks here. We're not talking about a minor annoyance. We're talking about affected webpages being completely unviewable. Full stop. Just like that.


I am still using Firefox day to day, and I have been using it since its Phoenix days. So i know well how it well it did in the old days against IE.

But doing good in the past simply doesn't mean everything. May be people hold different standard. But to me and a lot of others, Firefox today is the slowest browser of all, be it Safari on the Mac, IE on Windows, or Chrome/Opera on all Platform. And just a reminder Chrome was released on September 2008. And in many ways Firefox still cant match Chrome snappiness. 6 years! That is an awfully long period in tech industry.


Personally one of the main things keeping me from switching back to Firefox, as a current Chrome user, is the existing UI. I love Australis and I can't wait for it to go stable.


The great thing about Firefox is that it is completely customisable. You could use a theme like this https://addons.mozilla.org/en-US/firefox/addon/fxchrome/ I personally like it even more than Australis


It's good that Firefox can be customized, for sure. But I'm finding that after each major release these days, I need to perform more and more customization just to bring it back to a usable state.

I want a practical browser that does what I need it to. Yet with each new release of Firefox we tend to see further useful functionality stripped away, additional config panel options removed, and the UI dumbed down in one way or another. So whenever an update happens, it's off to searching for add-ons to basically undo whatever unhelpful changes the developers have just made.

Add-ons and customization should be there to enhance and already good piece of software. They shouldn't be there as band-aid that's applied to fix the numerous mistakes and bad decisions of the software's developers.


Funny, we're having the exact opposite experience.

I find that with every release of Firefox, I need less and less addons. Better dev tools? Okay, goodbye Firebug. Download popover instead of a different window? Goodbye DownloadStatusBar. Australis? Goodbye Firefox-button mover and FXChrome (I use Tree Style Tabs, but FXChrome make everything else look prettier anyway).


I gave up on config panel removals and UI dumb downs and now configure Firefox solely using about:config. I recommend you this approach. You will get much less annoyed.


You're right, that is generally a better option these days. Unfortunately, it still does suffer from the same problem, to some extent. Settings are sometimes renamed, and then it takes some time and effort to track down the new name, assuming the setting (or an equivalent) still even exists.


I'm the opposite. Chromes UI is awful. Doesn't scale for non-standard DPI screens, ghastly colour scheme, and the integrated Window decorations are primitive.

In KDE I can hide the FF window decorations, and it then uses no more real estate than Chrome, while still offering a better native UI. I'm just crossing my fingers that any UI changes in FF don't negatively impact us Linux users or drift too far away from native widgets.


Right now, Firefox is the only browser on Linux that supports non-standard DPIs.


It's not really any different on windows; chrome's UI there too isn't brilliant (I've got a high dpi screen). It's much better than a year ago, when everything was simply blurry, but it's still much worse than FF or IE.


Exactly. I was fiddling with non-standard DPIs on my machine and I noticed that Chrome trainwrecks on them, and Firefox looks great.

I get frustrated because all the people who complain about the new Ausrtalis UI seem to want to drag FF back to the oldschool Netscape/IE6-looking thing. I think FF's UI is in a perfect place in the current version - clean, crisp, and compact. My only complaint about current FF is the redundant "bookmark-star" button in the Address bar that I'm constantly accidentally clicking.


Good news: Australis moves the bookmark star out of the address bar into the toolbar. You can then customize your toolbar to remove tha bookmark star button, if you like. I did. :)


I have the old style addon to put the bookmarks star back in the address bar, because the Australis bookmarks button comes with the bookmarks menu stuck to it, which I don't need, I have ctrl-b.


Yeah, that's pretty silly. I mean I'm sure they had to implement new code to make this silly two-button Siamese construct exist. Is there even a designer in the house? At least give us the option to have just the Star.


As a designer, I agree that Australis UI is horrible. They made a touch screen interface and slapped it on desktop. It uses all the touch screen patterns a desktop interface should not have.

In order to fix it, they first should provide a compact version: same button sizes on the toolbar, smaller and better looking tabs, less wasted space between interface items.


Interesting - I find the Australis (on linux & OSX) cleaner and takes up less screenspace. I wonder what we're doing differently...


Yes, the hideous refresh button is so small, with no border around it, your mental energy require to clicking it will definitely be much higher then something easy to point to and well defined with borders or signs.

Taking less space, and looking nice is one thing. Easy to use is another thing.


Ah - that explains it. I hardly ever use the mouse for that kind of thing anyway. I pretty much only use it for navigating pages, I use the keyboard shortcuts for tabs, refreshing, loading, etc.


More and more desktops have touch screens now. For the last couple of years this has been a trend. Also, some desktop OS's support touch quite well. So you better update your terminology, since desktop does touch.

Whilst the new UI is a little bit of an improvement on touch devices, it still kind of sucks. The main problem is the poor scrolling performance of FF though.


Still, degrading the desktop experience for 99% of the users for the sake of 1% is not a smart move (#1). Yet, we see it more and more often. (Even more so with websites.)

Sure, they can make a touch-friendly interface, but they should just put in behind a flip switch in the options. Using the mouse for half a minute to enable it will not break anyone's hands. Best way to feed the goat and keep the cabbage.

#1: guessed the numbers, but I will eat my non-existing hat if the touch screen monitors are over 5%


> They made a touch screen interface and slapped it on desktop.

Which would be justifiable (not good, but justifiable) if there was a tablet where Firefox would actually be usable.


Both Snappy and Async helped to a degree, if you experience none of it, test your profile for problems, or sit back and wait either for e10s or Servo.


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


Performance-conscious games should probably use asm.js. I wonder if GC is relevant for asm.js.


One of the trade-offs of asm.js is that it uses malloc/free style manual memory management and thereby sidesteps GC. More pauses for the programmer in exchange for less pauses in the program.


Technically this is false, as some asm.js compiled games will actually be running their own GC inside the asm.js environment and will still suffer GC pauses - except now it's all single threaded and using a smaller heap so the performance is worse.

Unity is one example of this - they use the Mono runtime and their scripting is based on .NET so browser-targeted Unity games will have GC pauses even if they use asm.js.


The same could be said for using object pools. No need specifically for asm.js. ATM asm.js is used primary for supporting large existing C/C++ codebases, not trying to get free performance gains in your game via premature optimizations.


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


Having written one of the major HTML5 game engines (Construct 2), it's extraordinarily difficult to completely avoid memory allocations, so there is always some garbage overhead. Consider straightforward calls like slice() make allocations and have to be worked around to avoid garbage - and that is very much just the tip of the iceberg.


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.


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


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.


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.


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.


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




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

Search: