7 ms·
Performance is the side-effect, not the cause. The cause is the fact that chrome uses separate processes both for security, and so if one tab crashes, you don'
by tytso 15y ago
Performance is the side-effect, not the cause. The cause is the fact that chrome uses separate processes both for security, and so if one tab crashes, you don't lose them all.
The fact that it uses more memory is a design tradeoff (although with shared text pages it's not as bad as one might think). The real question is whether you would ever have that many tabs open, and how much memory do you have on your desktop?
- zobzu 15y agoFirefox compartment memory as well. Using a separate process it the easy way, using thread is the hard way. Each has pro and cons I guess. Even Firefox is getting a multiprocess model for testing. But for example you can't completely isolate a thread if it crashes. But you can forbid it to access other memory areas for security, that's what Firefox does. Since Firefox 4 each tab has it's own separate garbage collector.
- silon 15y ago>But you can forbid it to access other memory areas for security Not in C/++ in any standard definition of "thread".
- zobzu 15y agoWhat you mean is not in a mandatory fashion and at the C code level and that's true. But what I meant is that you can do it for the objects you manage, such as JS code and the rest of the webpage. It doesn't prevent an issue in the Firefox interpreter itself.
- tptacek 15y agoEvery browser does that. Virtually all the problems that matter are internal to the browser.
- zobzu 15y agothats not true. FF 3.6 and before that did not compartment it per tab. Likewise for IE, but they're per process like Chrome now. Not sure about other webkit browsers and Opera, it's likely other wekbit browsers (except safari) do not do that.
- tptacek 15y agoI can't follow what you're trying to say here. I'm probably just misunderstanding you. Someone suggested that Firefox had memory segmentation, and just did it with threads. That's obviously not accurate. Then you said, "they have it, just with javascript objects". What mainstream browser allows javascript in a tab to access objects in any other page, let alone another tab?
- icebraining 15y agoDepends on what JS it is. Obviously websites can't, but a huge part of Firefox is coded in JS, which runs with high privileges. It's perfectly possible that tab specific trusted JS code (including possibly extensions code) wasn't compartmentalized and now is.
- tptacek 15y agoSure! Just keep in mind that a lot of that "trusted JS" is actually just a thin wrapper around C/C++ code, and the C/C++ code tends to be where the problems arise.
- scott_s 15y agoSure you can. Use the mprotect() system call: http://pubs.opengroup.org/onlinepubs/7908799/xsh/mprotect.html http://pubs.opengroup.org/onlinepubs/7908799/xsh/mprotect.ht...
- beagle3 15y agomprotect() doesn't let different threads have different read/write permissions to a page. You need different processes to achieve that.
- tptacek 15y agoNo, threads on x86 share page hierarchies and cannot be configured not to access memory accessible by any one thread.
- bambax 15y agoThe limit is found pretty soon on older machines; while the OP tests on a Mac with 8GB of Ram, on my main machine I have only 2GB of Ram, and Chrome becomes unresponsive after ~10 tabs opened. I didn't think Firefox would be better but if it is, I might go back to it!
- Blarat 15y agoI have 1.5GB of RAM and I usually have ~15-20 tabs open without any performance hits on chrome, (including Eclipse, Skype, filezilla calc, evernote etc etc open). Maybe there's something wrong with your install?
- icebraining 15y agoSame here; right now I have FF open with 30 tabs and Chromium with 10 (including Angry Birds, installed version) in a 2GB laptop and it's fine.
- drdaeman 15y agoI have 6GiB of RAM, and Chromium eats most (typically, about 70-80%) of it. When I have too many tabs open with a lot of browsing history (for reference, currently, I have 61 tab open) Chromium eats all available memory, so, obviously, system chokes on swap. Still, I prefer manual memory usage control (I have a meter in my panel, near the clock). This feels easier than less-predictable browser-wide hangs where I can't even switch the tab. I've tried Firefox 4 when it was released and I was unsatisfied with its responsiveness, for example, when I open a lot of flash-heavy tabs. While I've heard Mozilla devs did move plugins to separate process, in practice there were cases that the browser did hung for several seconds.
- FooBarWidget 15y agoEven back to the days before Chrome was released, many many people used to complain that Firefox grinded to a halt when they have 250 (!) tabs open.
- arkitaip 15y agomany, many people - really? I think they were a very vocal minority, that most people don't even come close to that many tabs.
- uiet 15y agoBrowser performance really matters for web automation, web testing projects with tools like imacros or watir.
- rmccue 15y ago> The real question is whether you would ever have that many tabs open, and how much memory do you have on your desktop? I have 60 tabs open now (in FF), and this is after closing most of them, on a 32-bit system with 4GB of RAM. I regularly hit over 200 tabs when browsing.
- Flam 15y agoW.T.F. I can't go over 6 without feeling messy.
- cbs 15y agoHow you feel doesn't really matter when you're doing anything other than idle browsing. This morning I had about 30 tabs open when I came into work, all documentation or reference of some sort that I will use in the next few hours. And thats about the lowest I ever get, if I'm looking up something new to me or complex it will easily shoot over 100.
- Flam 15y agoI'm afraid I disagree. There's no way you could multi-task all 30 open tabs at the same time. Read what you need and close the tab when you're done. Leave only the topmost page of the documentation open so you can find your way back down again if you need to. You should be able to tell whether a page has value to you or not within the first 30 seconds of skimming through it. Do you open every result on google for the first 3 pages of all your searches or something? Baffling.
- eleitl 15y ago200+ tabs open, 12 GByte RAM (I so could profit from a 64 bit Firefox).
- capnrefsmmat 15y agoIn the Gregor's blog post, Chrome performance is drastically worse even when it uses only one renderer process, not one per tab. In the demo, if one tab crashed, they all would.
- pbz 15y agoI have seen that claim before, but in my experience the few times Chrome crashed I had to close the whole thing. The individual tabs may have been working, but they definitely weren't responding, or at least I wasn't able to get to them as the wrapping process seems to have crashed. (Beside the point: the Android keyboard is worst piece of @#%$@ I have ever had to work with)
- hack_edu 15y agoThe Android browser is not Chrome as addressed in the article.
- pbz 15y agoI know that, I said Android keyboard, not browser. I'm typing this on a vanila Android phone, and the level of pain I had to go through just to type the text above is ridiculous. This is not even alpha quality, it's pathetic.
- yock 15y agoUse SwiftKey. http://www.swiftkey.net/ http://www.swiftkey.net/
- hack_edu 15y agoAre you on Gingerbread? The keyboards before 2.3 are awful.
- pbz 15y agoYes, I'm on 2.3.4. I started with 2.1, the keyboard itself was OK. Sometime around 2.2 it started crashing, about every other day. With 2.3 it crashes even more. The particular problem I had above was not due to crashing. As I was typing, the suggestion bar was pushing the text that I was typing out of sight. So I had to constantly fight with it to actually see what I typed. When taping to move the cursor, it was actually trying to make a selection, but only sometimes. Using the wheel to achieve the same made it constantly jump. The worst part was that when you reach the end of the text box you cannot scroll below and see what you typed. Well, you can, for a few seconds then it takes you back. You can type, however, but don't get to see what you typed. It's like typing blindfolded. I had to just post the message and go back and edit it. How something so basic passed QA is beyond my comprehension. Here's one of the threads about the keyboard crashes: http://code.google.com/p/android/issues/detail?id=15311 http://code.google.com/p/android/issues/detail?id=15311