4 ms·
This is more-or-less exactly what you do with Chrome all the time. Because each tab is a separate process, you're implictly closing and opening it for each new
by glenjamin 15y ago
This is more-or-less exactly what you do with Chrome all the time. Because each tab is a separate process, you're implictly closing and opening it for each new tab.
- thaumaturgy 15y agoI pointed this out on a Reddit thread quite a while back, started by some Firefox devs. Or maybe it was Opera devs. Anyway, I was surprised by the response: neither the devs, nor other commenters in the thread, saw the benefit to making every tab its own process.
- rpearl 15y agoIPC is very expensive. Furthermore, firefox 4 does have some separate processes (not per tab). Note that chrome's default is not per-tab either.
- thaumaturgy 15y ago> IPC is very expensive. I have trouble taking that at face-value; Linux seems to do OK with it and, for a while, there was a little-bitty web browser for Macs called Stainless (http://stainlessapp.com/ http://stainlessapp.com/) that did one-process-per-tab, and it seemed quite performant. Better, in fact, than all other browsers at the time. Unfortunately, it hasn't been updated in about a year now... > Note that chrome's default is not per-tab either. Oh yeah, somebody pointed that out to me back on that Reddit thread, too. I forgot. Still, I really think it should be, and that it should be considered standard practice for all browsers. A while back, my frustrations with browsers resulted in a quickie project that I called "Crash My Browser" (still up at http://crashmybrowser.com/ http://crashmybrowser.com/). I haven't tested it with recent browsers, but, once upon a time, at least one of the tests on that page could completely cripple not just that page's tab, but the entire browser, for most browsers. Since nobody seemed to get why that was a really stupid design flaw, I figured a demonstration was in order.
- rpearl 15y agoI know I'm a bit late with my reply, but I don't follow hacker news all too much. That said, in general, IPC is slower than threading for the simple reason that processes are in different address spaces. When you perform an IPC call, you must take a TLB hit. With communication between threads, there is only context switching overhead (assuming no preemption between calls.) Chrome has a few different ways to do tab communication, none of which are truly "one process per tab".
- VMG 15y agoWhy do you need communication between tabs?
- ootachi 15y agoTabs on the same domain can communicate synchronously.
- thristian 15y agoThat surprises me too, since Mozilla has been working on retrofitting their codebase to allow running web-content in a separate process for some time now: https://wiki.mozilla.org/Electrolysis https://wiki.mozilla.org/Electrolysis If that page is to be trusted, Firefox on Android already does it.
- rikthevik 15y agoWell, from a security perspective, it can make the boundaries between tabs a lot more concrete.