3 ms·
Why wouldn't you want a multi-process architecture? It's bad enough that so many apps can utilize the quad core CPU's we have in our PC's. At least the browser
by mtgx 13y ago
Why wouldn't you want a multi-process architecture? It's bad enough that so many apps can utilize the quad core CPU's we have in our PC's. At least the browser is one app that can fully take advantage of multiple cores, unlike most apps out there.
- jevinskie 13y agoYou can take advantage of multiple cores using a single process with threads.
- antihero 13y agoBut don't threads generally share memory? So therefore if a thread crashes, it can totally screw up all the other tabs still.
- wolfgke 13y agoScaling (and taking advantage of multiple cores) can be done by using threads instead of processes, but processes (and IPC) have larger overhead than threads. Processes need more RAM than threads. Google (and Microsoft) argue that using processes make the browser more stable in the sense that if one tab crashes, not the entire browser crashes, too (correct, as long as no deadlock in IPC between the processes occur - which has happened in some past Chrome relases) and makes the browser more secure (but not everybody agrees here). Thus they argue that the overhead of processes over threads is worth it. But if you just want the scalability there are more easy solutions.
- mistercow 13y ago>At least the browser is one app that can fully take advantage of multiple cores, unlike most apps out there. Nope. The vast majority of web pages and web apps do work either on page load, or in direct response to user input. While in the background, they almost universally sit idle. Multicore has no benefit in this scenario. The exceptions are games and media, but music is the only case there where you are likely to have something actively running in the background. Unfortunately, audio decoding is so incredibly cheap now that the gains from using a separate core are negligible.
- nijk 13y agoLet me introduce you to my friends Gmail and Facebook.
- nathanb 13y agoI didn't say I definitely don't want a multiprocess architecture. Just that a multiprocess architecture may not be the only way to solve the problem, and if Firefox devs believe they can provide equivalent stability without switching to a multiprocess architecture, I won't ding them just because they can't tick a checkbox that Chrome ticks.
- atesti 13y agoIt's actually hard for a browser to utilize multiple cores, because Javascript and DOM designed for one thread: While javascript runs the layout shall not be recalculated. When you click and an onclick handler fires and JS runs, the browser cannot run other JS of the same tab in parallel. While HTML is parsed any time a inline script could come and block processing the rest of the document. Chrome and other browsers of course work hard against that: There is a second fast parser which heuristically finds ressources to preload and Chrome just switched to blink in order to do the parsing and something else in parallel and now they want to do CSS calculations in threads, too, which is hard. There was a story here about it recently: https://news.ycombinator.com/item?id=5895729 https://news.ycombinator.com/item?id=5895729
- snogglethorpe 13y agoIt's significantly more difficult to share resources between processes than it is between threads. There are certainly things you can do, but it requires much more effort (especially if you're trying to be portable), and the results typically aren't anywhere near as good. The effect of this is pretty obvious with chrome vs. FF: chrome memory usage grows a lot faster with multiple tabs than FF's memory usage does. OTOH, it's easier to manually control usage in chrome by killing tabs. Which of these effects is more important depends on your needs (so I tend to switch between chrome and FF...). Anyway, anybody claiming that chrome is "obviously" better than FF these days is on crack. They are both very good, and each has its strong points and weak points, but they're pretty much on par...