26 ms·
Multi-process Firefox brings 400-700% improvement in responsiveness
- rl3 10y agoThis will probably have significant implications for web worker behavior. If memory serves, workers are unable to directly communicate with each other in Firefox when the UI thread is blocked, because message handling runs on the same process as the UI thread. Chrome doesn't have that limitation since it's already a multi-process architecture.
- spynxic 10y agoWonder if Graal.JS could offer any improvements to the browser
- gnicholas 10y agoInstructions for enabling this feature (via about:config) are provided in the author's prior article on the topic: https://techcrunch.com/2016/06/10/mozillas-multi-process-architecture-project-cleared-for-takeoff/ https://techcrunch.com/2016/06/10/mozillas-multi-process-arc...
- daenney 10y agoJust so that people don't have to do digging in that article. In about:config, set browser.tabs.remote.autostart to true and check about:support for Multiprocess Windows (might need to restart). For now though you'll have to disable any plugins for it to work which can be a bit of a handicap. But... almost there :).
- mintplant 10y agoPlease be aware that if you force-enable e10s while using incompatible addons, you'll end up with a very slow browsing experience. http://arewee10syet.com/ http://arewee10syet.com/ has a compatibility list for some of the most popular addons.
- AstralStorm 10y agoGot to love the '401 failed fetching from AMO' add on.
- diggan 10y agoSeems like e10s gets disabled if there is a incompatible addon activated. Not sure I would trust that list, the only two addons I run, is Tree Style Tab and Greasemonkey, both listed as compatible on the website, but going to about:support shows: > Multiprocess Windows 0/1 (Disabled by add-ons)
- dblohm7 10y agoAddons are not supported by default in e10s mode on the release channel yet.
- sandyarmstrong 10y agoWhat about using incompatible addons triggers a slow browsing experience?
- Crespyl 10y agoI think it has to do with some kind of global locking/racing conditions. The current version of LastPass is a big culprit, I've had it lock up nightly for >30s some times. They have a beta version that is e10s compatible which doesn't have this problem.
- Zekio 10y agoThe speed is great as long as youtube doesn't autoplay a new video which freezes the whole browser for me until it is done loading.
- firebird84 10y agoFor what it's worth, you can turn off autoplay in about:config.
- akerro 10y agoWhole browser freezez for me on any amazon page. Just when it starts rendering it freezes everything inside Firefox window for a few seconds. It's so annoying that I'm considering dropping Firefox after over a decade for Opera or Brave browser.
- nl 10y agoI wonder if this is the same issue as I'm seeing: https://news.ycombinator.com/item?id=12437130 https://news.ycombinator.com/item?id=12437130 Amazon works for me though. Hmmm.
- akerro 10y agoVery similar issue! My gf walked into it recently on ArchLinux, she had the same problem, for her e10 was enabled by default. When she visisted pons.com the whole browser was frozen for at least 10seconds, and if it didn't unfreeze itself after that time, it was just consuming memory and freezing whole OS until Linux killed Firefox process. My issue was solved by disabling e10s, for her it didn't help so she switched to Opera already.
- gnud 10y agoI wouldn't switch to Opera though. Use vivaldi instead.
- malnourish 10y agoHave you tried disabling the functionality in about:config?
- malnourish 10y agoIs there a list of commonly used extensions that are (in)compatible?
- wjoe 10y agohttp://arewee10syet.com/ http://arewee10syet.com/ has a list of addons and their compatibility. I tried turning on the about:config option and the URL bar broke, so obviously something I have is incompatible - I suspect it's Classic Theme Restorer, although that site does list it as compatible.
- danblick 10y agoDoes anybody know more about how Mozilla manages experiments? I'd always assumed that all users downloaded an identical binary and got the same behavior. How do they assign 10% of their users to an experimental group? Is it possible that two users will see different functionality when they are both using the same OS and release, say Firefox from the latest version of Ubuntu?
- TheCoreh 10y agoAs with most native A/B tests, the binary probably ships with code for both functionalities. When the browser launches for the first time they generate a random number, and if it's below a certain threshold you get variant A, above you get variant B. The information gets persisted on disk so it remains unchanged across sessions.
- theandrewbailey 10y agoIt seems that there is some communication back to Mozilla, since they claim that they can increase or decrease the number of users in each group over a week; that seems unlikely to come in the form of a new binary.
- gsnedders 10y agoNon-stable channels get frequent builds, so it's not implausible it's a new binary.
- kbrosnan 10y agoFirefox generates a random number on first run. Users who are selected for the experiment are sent a signed extension from Mozilla that makes browser.tabs.remote.autostart preference return true if they are on the correct release of Firefox. https://wiki.mozilla.org/Electrolysis/Experiments https://wiki.mozilla.org/Electrolysis/Experiments
- sp332 10y agoCertain features are rolled out with Test Pilot https://wiki.mozilla.org/Test_Pilot https://wiki.mozilla.org/Test_Pilot but that doesn't seem to include the e10s testing.
- nl 10y agoI switched to Firefox from Chrome about 12 months ago. It isn't as good as Chrome, but I was trying to reduce my Google dependencies. It has been mostly fine (except for an annoying OS-X multi-screen bug where it screws up the sizing). I was really looking forward to this feature to help close the gap on Chrome performance. Until August (I think Firefox 48.x), when it became unusable on any site with... something. I'm not entirely sure what triggers it- I don't think it is just video alone. Something make the entire browser lock up entirely for minutes, and sometimes it even runs out of memory and I have to kill it via the OS. No add-ins (except for Firebug). Frustratingly, I can't replicate it well enough to be a useful bug report. I'm this close to switching back. Muscle memory and shortcuts to Firefox is the only thing stopping me. So.. this will be great, but please make it a workable browser.
- 0xfeba 10y agoFunny, I have the same lockups with Chrome. Middle-clicking a new link (to open in a new tab) freezes the entire browser (all tabs) until the new tab is done loading. I believe it's a extension problem (uBlock Origin, EFF Privacy Badger), but I don't really want to get rid of any of them.
- dxxvi 10y agoI know this is not about ad blockers, but does anybody have any experience of using something like https://github.com/StevenBlack/hosts/blob/master/hosts https://github.com/StevenBlack/hosts/blob/master/hosts instead of uBlock Origin? Or even use it in the hosts file of our dd-wrt/openwrt routers?
- falcolas 10y agoI use something similar, and love it. Still get blocked by Forbes and similar for using an ad blocker (it's a network issue, you dolts!), but the performance gains in all browsers is well worth the few exceptions.
- teddyc 10y agoI use a similar solution and I love it. It works on every app and requires no browser add-ons. I use a list from this ancient looking website: http://winhelp2002.mvps.org/hosts.htm http://winhelp2002.mvps.org/hosts.htm I wish I could use this on my phone. EDIT: Looks like I should switch to the https://github.com/StevenBlack/hosts https://github.com/StevenBlack/hosts source, as it includes the one I referenced plus a lot more.
- drzaiusapelord 10y agoIts incredible multi-process took this long. Just goes to show you that your architecture decisions last a long time and are often difficult to change. Chrome had this from day one and never had a big and old codebase to worry about. Yet it took Firefox many years to get multi-process going and my understanding is that its much more limited and simpler than what Chrome or Edge do. I'm also a little surprised there hasn't been an attempt to launch a completely new Firefox from the ground up. Regardless of what they're doing right now, its still a legacy code monster and much more laggy than the competition. Maybe this is Servo's ultimate purpose, but every Firefox advance is welcomed but always feels like another layer of lipstick on this pig. Disclaimer: I use Firefox as my main 'non-work' browser several hours a day. Its good, but its very obvious when I'm not in Chrome from a performance/stability perspective.
- the8472 10y agoAddons are a big part of the firefox ecosystem and they reach deep into the internals of the browser. So just replacing the browser wholesale would break a lot of things over the course of a single release.
- kalleboo 10y agoThey are deprecating the old add-on API now in favor of a more Chrome/Safari-like one now though
- jayflux 10y ago|| I'm also a little surprised there hasn't been an attempt to launch a completely new Firefox from the ground up. I (hopefully) think this is what Servo is and will end up being. Has no legacy code, and is tiny in comparison to Gecko. It's OS support is fairly modern, and has no interest in supporting Windows XP. It's also written in such a way that allows them to be more multi-threaded and more concurrent than traditional rendering engines. At some point you have to draw a line in the sand and start again, and I hope Servo is that. You can check out https://github.com/browserhtml/browserhtml https://github.com/browserhtml/browserhtml which is servo running standalone
- faragon 10y agoWhy? Except because of memory allocation serialization impact, there is no reason for a multithreaded process being slower than multiprocess. And if that's the cause, it could be solved using multiple heaps.
- scott_s 10y agoMy guess is that the multithreaded-only design wasn't as good at exploiting the inherent per-tab parallelism. The original architecture probably had some synchronization points (perhaps related to the common GUI code) that did not allow processing each tab truly independently. Regarding memory allocation, yes, in theory one should be able to try to avoid sharing data across threads, which should eliminate serialization on memory allocation and deallocation. But I can easily imagine that in practice, in a codebase that was not explicitly designed to process each tab in parallel, you'll still end up sometimes sharing data across threads. I imagine they could have instead changed the architecture to be multithreaded in such a way to avoid my imagined sequential bottlenecks, but performance is not the only goal in a multprocess architecture. Sandboxing is another design goal, and that cannot be fully achieved with a multithreaded design. This is all speculation on my part, so if anyone who actually works on the Firefox codebase could correct me, that would be very welcomed.
- gravypod 10y agoI'd guess that it wasn't the effect of switching from threads to processes that made the difference. It might come from code clean up and fixing some of the IPC that was going on. This would have probably seen many eyes in the firefox dev community so they might have made some efforts to clean up the code under the hood before closing the lid on it. But I might be wrong as I have no ties to the development process of this.
- mintplant 10y agoOne near-future goal is to move the compositor out from the UI process into its own separate one. Mozilla currently maintains a sizeable blacklist of {feature, GPU, OS, driver} for hardware acceleration because glitchy drivers cause whole-process crashes. When this occurs a separate compositor process can be restarted instantly without the user noticing.
- uuoc 10y agoThis should come as no surprise. It has always been an epic architectural mistake to use the same single non-reentrant Javascript engine to both render the UI and run JS for webpages in Firefox. This change will finally undo that huge mistake made so very long ago.
- addicted 10y agoJavaScript was little more than a toy scripting language used to animate stuff and change layouts when html/Css wouldn't fit for the greatest part of firefox's early existence. At the time it was probably the appropriate decision. Now, it's a huge burden on Firefox and it's good to finally see progress on this front.
- creshal 10y ago> JavaScript was little more than a toy scripting language No, back then Mozilla was trying to do the entire UI logic in JS. That was the whole point behind reusing the same JS engine for both: https://en.wikipedia.org/wiki/XUL https://en.wikipedia.org/wiki/XUL
- eatbitseveryday 10y agoSince Javascript is just a language that happens to execute client-side within the browser, why can we not use an existing language syntax (or an existing language entirely) for this purpose? For example, Go, Python, Rust, or perhaps Perl? It feels like a broken shell scripting language that really should have been replaced.
- lomnakkus 10y agoSee e.g. https://www.scala-js.org/ https://www.scala-js.org/
- marcosdumay 10y agoSee WebAssembly, WebAsm, and probably another dozen similarly named projects.
- 10y ago
- rsp1984 10y ago“We can learn from the competition,” said Dotzler. “The way they implemented multi-process is RAM-intensive, it can get out of hand. We are learning from them and building an architecture that doesn’t eat all your RAM.” That's the money quote here. I've been waiting for this for a long time actually. Every browser I've tried except Firefox just basically eats all my RAM and other app performance (e.g. compiling stuff) goes down the toilet. Then on the other hand FF has not been so snappy and responsive traditionally. So responsive + soft on RAM is the combination I've really been waiting for. Let's hope they can deliver.
- deleted 10y ago[deleted]
- tomp 10y agoNevertheless, I prefer Chrome's approach. I can just open the process explorer and kill a few of the most memory hungry tabs/tab groups; with Firefox, there's no other solution than killing the whole browser. Can't wait for this fix!
- NoGravitas 10y agoI believe in current Firefox you could kill the memory-hungry tabs, then go to about:memory and force a GC. Or restart and let your tabs stay open but not loaded until you use them. Not that either of these is super-convenient.
- rwmj 10y agoIn Firefox 47 (or 48?) you can now do: about:performance which displays/kills the CPU hungry tabs directly.
- kohanz 10y agoI was in the same situation as you and found that in the end Safari fit that bill for me (not sure if it is an option on your platform). Responsiveness is probably somewhere between Chrome and FF, but memory usage has been much better.
- Lagged2Death 10y agoI'm surprised by the responsiveness claims because my ancient Windows PC runs FF superbly. I think Win10+FF is already more responsive now than it has ever been. I am also using Ghostery, however, with virtually everything blocked. It wasn't my intent to block ads, but that's mostly how it works out.
- jayflux 10y agoIt depends on operating system. For instance on OSX Yosemite Firefox is sluggish, yet on Windows 10 it's fast. People should really mention what operating system they're running when they say "x is slow"
- shmerl 10y agoA pity it's now practically useless, since many add-ons need modification to keep electrolysis enabled. In a year or so things will be better I hope.
- the8472 10y agoOnly if addon authors fix them. Afaik mozilla devs aren't planning on adding additional compatibility shims.
- shmerl 10y agoWell, if add-ons are maintained, authors will fix them. Unmaintained add-ons is a bad deal anyway.
- mintplant 10y agoThere's currently a compatibility shim in place, however using it can lead to poor performance.
- the8472 10y agothere are multiple shims, i'm saying they're not planning on adding new ones.
- Kenji 10y agoDoes that mean my website will now fit on a 700% narrower screen?
- AstralStorm 10y agoHow much extra memory is now used by it? All this improvement is meaningless if it hits swap on a typical machine.
- asadotzler 10y agoWe saw about 20% overhead going from one process to two.
- nchelluri 10y agoAh, so because I use addons I might not be seeing these benefits for some time? Good to know. Chrome is right now way faster for me, but I prefer using FF so I am in the Mozilla camp right now. Eager to see this rolled out. Early versions of e10s were very fragile and not so usable for me, so I switched it off.
- semicolon_storm 10y agoI use quite a few add-ons and my e10 was disabled because of them. I force enabled e10 using Mozilla's guide https://wiki.mozilla.org/Electrolysis#Force_Enable https://wiki.mozilla.org/Electrolysis#Force_Enable and didn't notice anything breaking (yet).
- nchelluri 10y agothanks, I've turned it on; I'll see how it goes.
- Sylos 10y agoIt's usually less so things breaking and rather just being slow. For example, if you use NoScript, it often takes really long to load up a page, because that's when NoScript becomes active, and because NoScript isn't yet properly e10s-compatible, it just forces Firefox to do things in a single-process way. But that actually makes things slower than when Firefox is running without e10s. about:performance is a rather good indicator, if an add-on is causing slow-downs.
- deleted 10y ago[deleted]
- zyngaro 10y agoOn which OS? On OSX I almost gave up on ff because it frequently freezes for no apparent reason.
- Animats 10y agoAt last, you'll be able to view other pages while Facebook's Javascript is in an infinite loop. With thousands of MIPS and a gigabyte of memory on the job, it had better be responsive. It's pathetic how much compute power it takes to run a browser. Even when the pages aren't doing anything interesting. It's not like they're running a 3D game or something.
- midnitewarrior 10y agoWhy is there still a browser capable of having its performance improve by 400-700%? This browser is a decade old. It is clearly the CPU and RAM hog everyone has said its been.
- Sylos 10y agoResponsiveness is not the same as performance. Responsiveness is how quickly it responds to user-input. So, for example, if you click on the Back-Button, then it highlights the Back-button to let you know that you have indeed successfully clicked the Back-button and that it is working on going back a page. How quickly it highlights that button after you've clicked it, that's how responsive it is in that aspect. Actually going back a page, i.e. loading the page from cache and rendering it, that's then again a performance-metric. But you are also quite clearly underestimating how terrible modern browsers are. Mozilla is also currently working on a research browser called "Servo", which has been written completely from scratch and employs a more modern architecture, and that isn't too far away from 400-700% performance increase over other browsers in certain aspects.
- corford 10y agoI've got 732 tabs open at the moment and performance is still fine. The upper limit for my machine seems to be about 745 ish - much beyond that and FF runs out of video memory or something (new tabs render sites half black).
- ActsJuvenile 10y agoYou need to get a better handle on your life.
- brokenmachine 10y agoLol, I've seen that issue myself, but only at maybe half that (ridiculous!) number of tabs. If you make the window smaller you can still do some stuff, but you need to restart FF (and wait for your 732 tabs to reopen!) to get everything back to normal. Computers are meant to solve problems, not create mindless tab-closing jobs for humans! We should never have to close a tab! Tab hoarders unite!!
- matt_wulfeck 10y agoI don't know. "Eating up all my ram" seems perfectly acceptable to me at first glance. I purchase ram and use it in my computer for expressly this purpose: to improve the responsiveness and snappiness of programs. Where do you draw the line at what's acceptable use of ram and what's not? I have 32G on my desktop, is it unacceptable that chrome is using 8G?
- scott_karana 10y agoI think it's "inefficient use of RAM" that they're talking about. If Firefox should conceivably run in 8GB, but ends up trying to use 33GB (in your case), that would obviously be bad. Mozilla just targets efficiencies that include people with much, much less RAM than you for their baseline.
- Sylos 10y agoThe question is how sensibly Chrome uses those 8 GB of RAM. We are very much still at the point where (most likely) not your entire hard drive + whatever data is generated on the fly or loaded from a webpage fits into your RAM. As such the often repeated statement that "unused RAM is wasted RAM" is still nonsense. There is always something which could be cached in RAM and would provide a speed-up of some form. If Chrome reserves 8 GB of that for itself, then it should utilize that in some form, so that it's used more sensibly than it could be used by other programs. For example, Chrome could keep a hundred pages from your browsing history cached in RAM, so that when you go back, it loads that instantly. That is a speed-up, but you probably will never go back one hundred pages in a row. So, another program could almost certainly use the RAM more sensibly than Chrome, if that was the case. And what Dotzler is referring to, is the worst kind of offense. If his promise holds true, Firefox's implementation will be just as good as Chrome's in terms of speed, but will use less RAM. Which would mean that Chrome is using some RAM without providing a speed-up, i.e. actually wasting that RAM. And that is always unacceptable.
- Zpalmtree 10y agoI hope this works out well, I often see my firefox freeze due to heavy extensions, and would much prefer if it just froze one tab. For me, higher ram usage wouldn't bother me if it meant no freezing, but I imagine it does matter to most of the audience, and it's too much effort to develop two feature sets.
- zobzu 10y agoIve been testing Firefox e10s as in multiprocess Firefox for months now (in Nightly, and even before that). At some point it became very usable and it still is today. HOWEVER while the interface is, yes, much more responsive, it is also NOTICEABLY slower. I ended up reverting recently and I'm using single process Firefox right now. Its fast even thus from time to time the UI may block if there's heavy stuff going on. Whatever makes e10s slow they gotta fix it... I suspect there's a lot of synchronization code.
- wcummings 10y agoI've been running Firefox Developer Edition (which has multiprocess) for a few weeks now, it's noticeably faster for most sites.
- eberkund 10y agoYou can install v51 nightlies from here: https://nightly.mozilla.org/ https://nightly.mozilla.org/
- Double_Cast 10y agoI use both FF and Chrome. Chrome is more heavy-duty, so I use it for Dedicated Browsing. I've set it such that when something calls me away and I close Chrome, the tabs will reopen so I can continue where I left off. But sometimes I'll be doing something in another program and need to look up something quickly. In such cases, I don't wanna wait while Chrome reopens 11 tabs so I'll use FF instead. My FF-tabs aren't saved between sessions, so I only see a single fresh tab when I open it.
- Hydraulix989 10y agoIs this different than multithreaded? What are the benefits? Is it really just about isolation/sandboxing? Why so much RAM? I thought the OS could share pages across processes...
- dschiptsov 10y agoSo, finally, some emerging consensus among packers that pthreads is a brain-dead concept, and thousands of its advocates are just narcissistic idiots, loving to hear their voices?
- sambe 10y agoEvery odd browser performance topic is dominated by people claiming Firefox has been faster and more scalable than Chrome for years. Every even one is dominated by people claiming the opposite. This thread seems to be the latter, my experience is the former. If you see bad performance/memory usage with a small number of tabs, are you sure that it's not due to bad plugins? I think about:memory and about:performance could be helpful. I seem to recall they used to have some reporting on known problem plugins (perhaps as part of https://www.mozilla.org/en-GB/plugincheck/ https://www.mozilla.org/en-GB/plugincheck/).