572 points · by bpierre · 10y ago · 337 comments
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.
Firefox was first released for android around the time I bought it though, and turned it into a capable web browsing device.
Its also one of the most energy efficient on most platforms.. (edge is more efficient on Windows, though it does not take into account that the engine is always running even if another browser is in use)
I've been tracking lots of programs with powertop, including many browsers, in the quest of an efficient desktop and Firefox is pretty good.
I also appreciate its great plugins. With vimperator I can configure Firefox using a dotfile, and setup lots of neat things like:
1. A ssh proxy mode that also routes DNS queries
set! network.proxy.socks=localhost
set! network.proxy.socks_port=8888
set! network.proxy.socks_remote_dns=true
command -nargs=1 proxy set! network.proxy.type=<args>
2. Site-specific Google searches, with autocomplete for the site URL
command -nargs=+ -complete=url site open google site:<args>
map s :site<space>
All this is really neat functionality, and very simple to achieve. I am waiting for good per-tab sandboxing, but in the meanwhile I have aliased firefox to /usr/bin/firejail so the whole application is sandboxed.
Apologies for the offtopic, but it's really exciting how a program that seemed to have lost development momentum is becoming really great again. Quite close to being the emacs of browsers if you ask me, with so many features and scriptability. Paradoxically you can get best access to these features with a plugin that tries to emulate vi, but you get the idea!
I really wish I had the option to trade off responsiveness for memory usage by being able to mark tabs as "no background activity allowed" so FF could serialize that content to disk when the tab isn't in focus.
There are many things that can be done
A lot of the improvement in the reliability of consumer grade SSDs is due to OS improvements in how they manage their write operations to the hard drive. Windows is considerably more conservative in how it uses it's page file and what does it write off to the SSD, linux has also made a lot of improvements in how it uses the swap partition if it uses it at all, other things like having to be able to suspend the PC in "hibernation" mode without actually having to write a "hibernation" file to disk by keeping the CPU at pretty much an off state but refreshing the ram also saves a lot of day to day write operations especially on mobile devices.
So overall I highly doubt that Firefox went with the suspend to disk route, because if it did it would be a pretty big step backwards.
Also as power conservation goes writing to SSD/HDD is more expensive than writing to RAM and keeping it refreshed, so using the SSD as a storage device instead of the RAM can also have negative effects on the battery life of mobile devices.
As for security, no, unless there's some unknown vulnerability now (or that they create), that will be ported over and somehow more effective between (potential) processes. So, I doubt it.
fork(2) does COW. With careful design† forking a new process only results in new and modified pages being not shared.
† Hard! But single-process threads + security is hard too.
http://unix.stackexchange.com/questions/58145/how-does-copy-...
b) hosting some tabs in the same, sandboxed process is still stronger than hosting all of them in the parent process.
that said i think firefox's choice is more sensible.
If it's just inefficient, that's a different story.
So what you might think of a benefit one day might be a drawback the next if you want to open twice the same amount of tabs, or run a big build in the background.
Firefox is my favorite browser overall (especially on other OSes), considering its smaller memory footprint and lack of sluggishness with tons of tabs (compared to Chrome) and the fact that it's from Mozilla, a company I hugely respect and admire (even with some of the missteps that have happened in some aspects in the past few years).
FF is for work, Safari for non-work. Chrome when I need Flash or testing Chrome-only content (some great plugins) - pretty rare.
Can't wait for this fix!
In actuality, very few non-server PCs can be populated with any more than 16-32 GB. It's not a matter of bother or expense at all. It's a design limit.
Every single time I've driven a non-server PC into hopeless swap thrashing, it's been the damn browser that was the culprit. Don't bother trying to advise me to bookmark 100 open tabs in 10 windows to save space. That is (forgive me) an insult to one's intelligence.
> you need to close some tabs
This comment is really not contributing anything to the matter. Obviously everybody could think of closing tabs without you advising to do so, and if they don't, it may be because they want these tabs around. I regularly keep a lot of tabs around because this is my work pattern.
Personally I wouldn't buy a laptop that is incapable of supporting the amount of ram that I need for my "work pattern".
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.
I have to use Chrome for anything video related or JS heavy (monitoring/graphing stuff for the most part), but I'd hate to switch to it for everything. There are too many addons that I rely on in Firefox, on top of my general dislike for Chrome's minimalist UI and standard Google privacy concerns.
I've tried turning on the config option for electrolysis, but it breaks some addons, so that's still a no go for me for now.
All this takes maybe five minutes on Linux, on Mac OS X it will freeze the OS for long periods of time and take 40 minutes to run. In terms of hardware, the Linux box has less RAM, CPU and slower discs.
Regarding the Javascript stuff: Part of it may be that Chrome is the new Internet Explorer. People develop on and test for Chrome (because everyone uses Chrome, right?). Chrome does have the better Javascript engine, still, I believe that much of the slow Javascript on Firefox (an other browsers) could be avoided if people bothered testing a little more.
Chrome does have the better Javascript engine, still, I believe that much of the slow Javascript on Firefox (an other browsers) could be avoided if people bothered testing a little more.
All major engines are pretty much comparable speed-wise. The biggest difference is probably in memory management (of the HTML & JS engines), which may favor some forms of site/lib structure and architecture over others – that's IMHO where the majority of slowness comes from (for any browser).Afaik firefox still doesn't have OpenGL accelerated compositing (at least not enabled in stable builds yet) on linux
On OSX and Windows it has hardware accelerated compositing, video decoding, canvas etc...
Safari is the only logical choice on OS X laptops, at least. Everything else just eats up the battery like crazy.
Edit: I should emphasize that I'm not saying Firebug is superior, just that I'm used to it.
You might want to try Firefox's built-in Web Console. I switched a year or two ago when it was less powerful than Firebug, but notably more stable, and I haven't gone back since.
> except for an annoying OS-X multi-screen bug where it screws up the sizing
Can't argue with you there. At last exiting full-screen video no longer takes the entire browser out of full-screen.
Maybe it's a personal thing, but I much prefer the built in developer tools on Firefox to that of Chrome.
However, something recently has changed. Firefox will work fine and then something will cause it use a large amount of CPU that it doesn't let go of even after closing all the tabs. I have to close the whole browser and re-open it. This can happen a few times a day.
I'm hoping it's a regression that will be fixed soon.
Which one do you use? There are several.
Tab Mix Plus [1]
TooManyTabs [2]
Tree Style Tab [3]
Use one or more of these with the Session Manager [4] extension and life becomes a lot easier with several hundreds of tabs. I highly recommend looking at the configuration options provided by each of these extensions and adapting them to how you'd like them to behave. Some of these are also developed with compatibility with the other extensions in mind.
[1]: https://addons.mozilla.org/firefox/addon/tab-mix-plus/
[2]: https://addons.mozilla.org/firefox/addon/toomanytabs-saves-y...
[3]: https://addons.mozilla.org/firefox/addon/tree-style-tab/
[4]: https://addons.mozilla.org/firefox/addon/session-manager/
I also switched from Chrome, but for slightly different reasons...I got to thinking about Google, and Chrome,and ad-blocking, and it occurred to me that Chrome will probably never allow extensions on Android, not because it's technically not possible, but because ad-blocking is bad for business (if your business is showing ads).
How does the Chrome team reconcile this? We know that ads are annoying, and ads can track you, and some ads can even be malicious. It seems that blocking ads make a browser better. But the Chrome team is not allowed to block ads on Android, so they are purposefully making a worse mobile browser.
Anyway, I do a lot of surfing at night in bed on my Android tablet, and I'm going to stick with Firefox.
But firefox scrolling is especially slow. irccloud.com is the main culprit (and I use irccloud a lot). It's pretty bad in gmail as well.
The react app my team is working on is also far slower in Firefox. Try scrolling this in Firefox and Chrome and see the difference (the scrubber is at the bottom of the blue area, like a video). Butter smooth in Chrome, horribly slow in Firefox: https://hsreplay.net/replay/7VAKLeMNaXvshAawnUUoni
It's pretty bad on both Windows 10 and Arch Linux (different computers). Worse on Windows, actually, but only after some time -- I'm in ~30 channels, fwiw.
It doesn't fix performance in your react app, though. I've filed a bug about it: https://bugzilla.mozilla.org/show_bug.cgi?id=1300848
I tried again on 48.0.2, ... same thing.
I can't nail it down specifically enough to file a proper issue report, so I guess I'll keep trying when the next releases come out.
I also notice that webapps seem to like Chrome better, but FF usually performs "well enough" that I've put up with it because I find it (for me) to be markedly better at helping me deal with the ginormous amounts of text content I apparently consume. But webapps have been degraded enough for the last month-or-so that I'm running chrome in parallel just for those.
I love FF and I'm hoping that this is one of those isolated things that the fabulous team over there fixes before too long. (I suspect it's a JS related something or other, but I haven't been able to track it down specifically.)
(Wow. Now there is a rambling comment!)
[1] https://bugs.chromium.org/p/chromium/issues/detail?id=393395...
I had an issue but on Windows 10 where sometimes on video playback FF would just lock up and windows would restart the graphics driver. I also couldn't reliably reproduce it, it sounds like a similar problem.
This is my bug report: https://bugzilla.mozilla.org/show_bug.cgi?id=1280706
Get Chromium.
I wish I could use this on my phone.
EDIT: Looks like I should switch to the https://github.com/StevenBlack/hosts source, as it includes the one I referenced plus a lot more.
Now, it's a huge burden on Firefox and it's good to finally see progress on this front.
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
By doing so (running both the UI code and scripts from the internet on the same non-reentrant JS engine) means that only one gets to run at a time (either UI code or JS from the internet). That's why FF's responsiveness sucks at times, any long running JS script from the internet also prevents the UI code from running.
The JS engine should either have been reentrant (so UI code could run even though some random internet script was still running), or there should have been two independent JS interpreters loaded, one used for the UI code only and a second for all the JS from the internet.
The same asynchronous logic used to have multiple browser engines with multiple JS runtimes talk to each other could also be used for multi-threading while making shared, thread-safe datastructures of non-JS parts much easier.
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 :).
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)
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.
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/).
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?
e10s code is present in all builds. The system add-on contains logic that decides whether to turn it on or not. The system add-on can be updated daily (or more often), in all channels.
* I apologize for the naming, this is entirely my fault. I spent a lot of the last twelve months scheming/designing and developing experimental update mechanisms for Firefox.
With e10s, it was clear that it would be included in Firefox, so they just tested it by pushing it through the normal chain of Nightly->Developer Edition->Beta->Stable.
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.
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 which is servo running standalone
Not really the plan. Servo may eventually become a product, but that would be in the very far future. But Gecko can use lessons learned from Servo, and try to share code with it, so you can incrementally replace parts of Gecko.
> and has no interest in supporting Windows XP.
I don't think that's the case? We don't have users on XP so we may not support it right now, but that's just an issue of priorities and not having the resources to fix all the things at once.
There are more XP users of Firefox than there are on Linux (probably for other browsers too). If Servo was a product it would probably care about XP.
Yup, hence my "hopefully", I'm aware small parts of servo may go into Gecko incrementally, however im still routing for something like browserhtml to be at a usable state, and for servo to run on its own.
> I don't think that's the case? PR link https://github.com/servo/servo/issues/1908 https://www.reddit.com/r/rust/comments/2vg0g1/this_week_in_s...
It might be worth making it clear what Servo's OS support is going to be, (for now and in future) to save any confusion
It's interesting how the history goes.
We had Netscape 4, and it was crap (remember when resizing a window reloaded the whole page?)
So they was a ground-up rewrite of the rendering engine, resulting in Gecko, which was put in Mozilla.
Gecko was great but Mozilla was a bloaty amalgamation of features, so this was created a pared-down Gecko version called...
~Phoenix~ ~Firebird~ Firefox, which had the great rendering engine and a lean, native-like UI.
Then there was KHTML/KJS which was built for KDE, which had a lean architecture but didn't have the investment to get the compatibility 100% there...
Which Apple then poured into the project in their fork to WebKit, which paid off in spades on the resource-limited iPhone a couple years later.
But Safari was only on the Mac (aside from their "Cocoa on Windows" version and a few open source ports), which Google took as a reason to create...
Google Chrome, where the biggest innovation was rendering each page in its own process (since Safari could freeze up due to one page going in an infinite loop in JavaScript).
So will someone out-Firefox Firefox and do what Chrome was to Safari for multi-processing? Take the rendering engine and put a new chrome on top of it?
KHTML was originally forked from QHtml (part of Qt) I believe (or they shared the same origin?).
Webkit later became a Qt component, the circle of life.
I would argue chromes biggest innovation was the UI, putting the address bar as part of the tab where it belongs (cue holy war) and better tabbing in general.
Mozilla was also the first to integrate the search and address fields, which they unfortunately stripped out of firefox (and many people think chrome introduced it).
Do you know when this was introduced/removed? I'm curious as to what this implementation was as I don't recall when this happened.
I always attributed this to Opera but I may be wrong
I highly doubt it, as there's very little incentive to create a gecko based browser vs a webkit or chromium based browser.
Check out Servo: https://servo.org/
Also, browser.html already exists in an early form (and is bundled with Servo). It provides a new UI written in HTML, CSS and JavaScript, so it can be rendered by Servo as well.
The same happened with the original Mac OS!
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.
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!!
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.
So the real decision point was whether to take an existing large C++ codebase and try to safely make it multithreaded or to take that same existing codebase, run it in separate processes, and make the communication work.
The latter is actually a simpler engineering task, in my opinion, and paves the way for doing things like sandboxing and whatnot once the initial rollout is complete.
But I might be wrong as I have no ties to the development process of this.
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.
Amazon works for me though. Hmmm.
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.
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.
about:performance is a rather good indicator, if an add-on is causing slow-downs.
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?
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.
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.
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.
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.
Why so much RAM? I thought the OS could share pages across processes...
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.