4 ms·
aside from Chrome, do ANY other browsers handle tabs separately?
by Tyrant505 14y ago
aside from Chrome, do ANY other browsers handle tabs separately?
- notimetorelax 14y agoEven Chrome reuses processes for child tabs. As far as I remember it is done to allow JavaScript to access child window from parent.
- bconway 14y agoWhich, to me, is one of its biggest annoyances. Opening a slew of tabs from a Google Reader page results in very clear resource contention (one of 8 CPUs pegged at 100% and nothing moving, etc).
- kevingadd 14y agoInternet Explorer has some degree of tab separation. I'm not sure if it's processes or threads, but it can recover a crashed tab.
- ygra 14y agoInternet Explorer uses processes but may opt to pack more than one tab into a single process to reduce system load by too many processes. Funnily enough it publicly supported isolated tabs before Chrome did (in a beta release of IE8) :-)
- javert 14y ago> Internet Explorer uses processes but may opt to pack more than one tab into a single process to reduce system load by too many processes. What is it about having too many processes that causes extra system load?
- ygra 14y agoIt's a rendering engine and JS engine per process, I guess. Those tend to consume memory (as overhead apart from the actual stuff needed for the page), for example.
- javert 14y agoI'm surprised that's enough to make a meaningful difference.
- ygra 14y agoKeep in mind that IE8 goes back to the Vista days. That was when there were still computers with just 512 MiB of memory (which might be fine with Windows 8 but Vista would chomp on it hungrily). At least this could be a reason.
- mikeash 14y agoEvery process consumes additional kernel resources for things like memory mappings, data structures for parent/child relationships, etc. There is also likely to be per-process overhead for libraries that allocate and manage global data structures. For example, the HTML parser likely has some global data structures that can be reused between threads but don't get shared between processes.
- javert 14y agoEvery process consumes additional kernel resources for things like memory mappings, data structures for parent/child relationships, etc. True, but we should be able to assume that that is negligible. There is also likely to be per-process overhead for libraries that allocate and manage global data structures. For example, the HTML parser likely has some global data structures that can be reused between threads but don't get shared between processes. That's what somebody else said, too. I'm surprised that's enough to matter, but I guess it must be.
- mikeash 14y agoI don't see why we should be able to assume that the kernel's per-process data structures are negligible. Maybe they are, but you'd have to measure it, you can't just assume it.
- javert 14y agoI've done enough kernel work to feel that it's a safe assumption in general, but that there may be some exceptions. For example, I wouldn't be completely shocked if somebody said, "We really need to support a particular version of an old OS that had unusually high per-process overhead in some particular corner case." If anybody knows how much kernel memory a basic process needs in, say, modern-day Linux, please chime in. I tried looking it up, but didn't find it. Probably it's just sizeof(task_struct), which I can't be bothered to check right now, plus a few KB for stack stuff.
- azim 14y agoWindows internals are very different than Linux and 32bit DLL files are not SO files. 32bit DLLs are typically relocatable (as opposed to .so files being position independent), which means they are compiled with a with a preferred load address they must be loaded at. If that address is not available at link time, the code must be moved to a different address and jumps must be fixed up to compensate. Because of that, in practice, loaded libraries are often not able to be shared between processes in memory. The reason for this decision is that pic code requires an indirect jump through an offset table which adds extra processing overhead. 64bit Windows is implemented closer to Linux style .so files due to the addition of new pointer relative addressing.
- lucian1900 14y agoI think Chrome does a similar thing, it groups together tabs from the same origin.
- pcwalton 14y agoChrome also has a cap on the number of processes. The process grouping per origin is not really intended as an optimization; it's required by JavaScript semantics.
- shin_lao 14y agoInternet Explorer, since version 8, has one process per tab.