News for hackers. Stuff that matters.
Re:Here’s Why Firefox is Still Years Behind Google Chrome by mtgx on Wednesday June 19, 2013 @10:42AM (#5905815)
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.
Re:Here’s Why Firefox is Still Years Behind Google Chrome by jevinskie on Wednesday June 19, 2013 @11:04AM (#5905930)
You can take advantage of multiple cores using a single process with threads.
Re:Here’s Why Firefox is Still Years Behind Google Chrome by antihero on Wednesday June 19, 2013 @11:25AM (#5906049)
But don't threads generally share memory? So therefore if a thread crashes, it can totally screw up all the other tabs still.
Re:Here’s Why Firefox is Still Years Behind Google Chrome by wolfgke on Wednesday June 19, 2013 @11:33AM (#5906104)
mtgox was talking about scalability, not stability.
Re:Here’s Why Firefox is Still Years Behind Google Chrome by glhaynes on Wednesday June 19, 2013 @12:37PM (#5906567)
Scalability just makes me want stability all the more because the stakes are that much higher.
Re:Here’s Why Firefox is Still Years Behind Google Chrome by samspenc on Wednesday June 19, 2013 @01:46PM (#5906999)
He's mtgx, not mtgox (the Bitcoin company).
Re:Here’s Why Firefox is Still Years Behind Google Chrome by mistercow on Wednesday June 19, 2013 @11:34AM (#5906111)
>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.

Re:Here’s Why Firefox is Still Years Behind Google Chrome by nathanb on Wednesday June 19, 2013 @12:45PM (#5906622)
I 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.

Re:Here’s Why Firefox is Still Years Behind Google Chrome by wolfgke on Wednesday June 19, 2013 @11:20AM (#5906022)
Scaling (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.

Re:Here’s Why Firefox is Still Years Behind Google Chrome by atesti on Wednesday June 19, 2013 @02:40PM (#5907375)
It'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

Re:Here’s Why Firefox is Still Years Behind Google Chrome by snogglethorpe on Wednesday June 19, 2013 @05:14PM (#5908291)
It'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...