Beta
×

Welcome to the Slashdot Beta site -- learn more here. Use the link in the footer or click here to return to the Classic version of Slashdot.

Thank you!

Before you choose to head back to the Classic look of the site, we'd appreciate it if you share your thoughts on the Beta; your feedback is what drives our ongoing development.

Beta is different and we value you taking the time to try it out. Please take a look at the changes we've made in Beta and  learn more about it. Thanks for reading, and for making the site better!

New Firefox Project Could Mean Multi-Processor Support

timothy posted more than 5 years ago | from the but-should-a-browser-need-multi-processors dept.

Mozilla 300

suraj.sun writes with this excerpt from Mozilla Links "Mozilla has started a new project to make Firefox split in several processes at a time: one running the main user interface (chrome), and another or several others running the web content in each tab. Like Chrome or Internet Explorer 8 which have implemented this behavior to some degree, the main benefit would be the increase of stability: a single tab crash would not take down the whole session with it, as well as performance improvements in multiprocessor systems that are progressively becoming the norm. The project, which lacks a catchy name like other Mozilla projects (like TaskFox, Ubiquity, or Chocolate Factory) is coordinated by long time Mozillian, Benjamin Smedberg; and also integrated by Joe Drew, Jason Duell, Ben Turner, and Boris Zbarsky in the core team. According to the loose roadmap published, a simple implementation that works with a single tab (not sessions support, no secure connections, either on Linux or Windows, probably not even based on Firefox) should be reached around mid-July."

Sorry! There are no comments related to the filter you selected.

As a Developer the Question I Have Is ... (5, Insightful)

eldavojohn (898314) | more than 5 years ago | (#27867049)

Why isn't everyone doing this?

As chipmakers demo 64 or 128 [gizmodo.com] core chips, why aren't we coding and being trained in Erlang [wikipedia.org] ? Why aren't schools teaching this as a mandatory class? Why aren't old applications being broken down and analyzed to multithread components that don't interact? Why isn't the compiler theory concentrating on how to automate this (if possible)?

It's becoming obvious the number of cores is going to far outweigh the number of applications we'll be running five years from now (so you can't leave it up to the OS) so why isn't this a bigger concentration now in application development?

I understand a lot of server side stuff can take advantage of this (in the nature of serving many clients at once) but it's only a matter of time before it's typical on the desktop.

Re:As a Developer the Question I Have Is ... (5, Funny)

stillnotelf (1476907) | more than 5 years ago | (#27867227)

Splitting your application into threads mean you have to get them to communicate with each other. When's the last time you met a programmer who loved communicating? There's nobody else in Mom's basement to practice on!

Re:As a Developer the Question I Have Is ... (2, Interesting)

sopssa (1498795) | more than 5 years ago | (#27867345)

I wish Opera will catch up soon to this aswell. Its a great browser, but when it does crash on some page whole browser goes down. They have to soon, seeing all other major browsers have implemented it.

Re:As a Developer the Question I Have Is ... (1)

A beautiful mind (821714) | more than 5 years ago | (#27867253)

Two easy answers:

On the serverside you just fire up a few more processes.
On the clientside you rarely need the juice that multiple cores provide. Processor speed still keeps improving _per core_. In most cases it is simply not worth the effort yet.

Re:As a Developer the Question I Have Is ... (3, Informative)

timeOday (582209) | more than 5 years ago | (#27867577)

No, your post and the one you replied to are off base, because firefox is already multithreaded:

# ps -eLF | grep firefox
user 23146 20837 23146 0 1 468 496 1 15:26 ? 00:00:00 /bin/sh -c firefox
user 23147 23146 23147 4 6 43763 59000 0 15:26 ? 00:00:12 /usr/lib/firefox-3.0.7/firefox
user 23147 23146 23149 0 6 43763 59000 0 15:26 ? 00:00:00 /usr/lib/firefox-3.0.7/firefox
user 23147 23146 23150 0 6 43763 59000 0 15:26 ? 00:00:00 /usr/lib/firefox-3.0.7/firefox
user 23147 23146 23154 0 6 43763 59000 1 15:26 ? 00:00:00 /usr/lib/firefox-3.0.7/firefox
user 23147 23146 23155 0 6 43763 59000 1 15:26 ? 00:00:00 /usr/lib/firefox-3.0.7/firefox
user 23147 23146 23156 0 6 43763 59000 0 15:26 ? 00:00:02 /usr/lib/firefox-3.0.7/firefox

And when I tried it just now, opening a new tab spawned a new thread (maybe more than one).

The question for this article is, why separate processes instead of threads? If you have processes sharing memory (especially read/write memory) this distinction between threading vs. multiple processes becomes rather small.

I do hope they can firefox survive a plugin crash, because youtube always locks up firefox eventually.

Re:As a Developer the Question I Have Is ... (4, Informative)

idontgno (624372) | more than 5 years ago | (#27867989)

Well, at least in the Unix/Linux model, processes are mostly independent, memory-wise. Shared memory is an explicit thing, under the category of Interprocess Communications (IPC). Under no condition does a fandango-on-core in one user process trash non-shared core in another process, and shared memory is generally restricted to shared-context communications, so both a smaller victim space and functionally more resilient. (Code using IPC shmem expects it to be volatile, and well-written code that uses IPC shmem vets its contents carefully before using it, so catastrophic oopses should be rare.)

Compare that to the more modern thread model, which, in almost every architecture I'm aware of, mostly runs in exactly the same user space. If a thread eats atomic hot buffalo wings, all its brother threads in the same process get the same heartburn. The upside, barring badness, is that thread management is lightweight: no need to copy the parent memory image to a separate allocation and set up full process "OS bureaucracy" data structures. In contrast, it's practically "wave your magic wand et voila you have created a new thread". Very responsive. Very fragile.

I think this responsiveness is a lot of the reason to love threads. And that "crashing" stuff? That never happens to me. So I don't need to worry about how fragile threads are.

ObDisclaimer: it's been a few years since I've done any hardcore coding, so I may have missed some important details. If I did, I'm sure someone vastly smarter than me will be happy to point it out.

Re:As a Developer the Question I Have Is ... (3, Insightful)

setagllib (753300) | more than 5 years ago | (#27868171)

There's a much more important reason to use threads instead of processes + IPC, and that's that inter-thread communication is a sub-microsecond matter. Even the context switch between multiple threads (in the same process) is so cheap you can have way too many threads and still not see the overhead if you're also doing real work. In Linux much of inter-thread communication happens entirely in userland, so you don't even suffer the cost of a system call. You can go even further and use atomic operations to make data structures and algorithms that never need system calls to begin with, and that's about as fast as you can get with threading.

Re:As a Developer the Question I Have Is ... (1)

ushering05401 (1086795) | more than 5 years ago | (#27867581)

On the client side *you* might rarely need the juice that multiple cores provides.

Until I can actually complete a full workweek within an optimized multicore operating environment I am not going to limit my expectations for these technologies.

As it is, I am constantly aware of the cycles that are dormant on my client boxes, and I would gladly experiment with truly parallel, low power machines in place of the speedy toasters I currently run. The one requirement being a userspace that is optimized for the hardware - and that doesn't exist.

Re:As a Developer the Question I Have Is ... (4, Insightful)

Chabo (880571) | more than 5 years ago | (#27867267)

As a recent college grad, I had one course in which threads came into play; it was in the course that introduced GUI work, so our GUI wouldn't freeze while a worker thread was running, but that is the area where single-threading is most apparent to the user, after all.

There isn't all that much room for undergrads to take courses on threading though; the course I took it in was the highest-level course that's required of all CS majors, and even still, that was only one semester after taking our "Intro to C and Assembly" course.

Realistically, an in-depth course on good threading implementation is at the graduate level, but there isn't a large percentage of CS majors that go on to graduate work.

Re:As a Developer the Question I Have Is ... (0)

Anonymous Coward | more than 5 years ago | (#27867527)

As a recent college grad, I had one course in which threads came into play; it was in the course that introduced GUI work, so our GUI wouldn't freeze while a worker thread was running, but that is the area where single-threading is most apparent to the user, after all.

There isn't all that much room for undergrads to take courses on threading though; the course I took it in was the highest-level course that's required of all CS majors, and even still, that was only one semester after taking our "Intro to C and Assembly" course.

Realistically, an in-depth course on good threading implementation is at the graduate level, but there isn't a large percentage of CS majors that go on to graduate work.

My concurrency class was in second year. It was the pre-req' for the third year OS class. There is plenty of room to teach it in the undergrad curriculum.

I also took a grad level parallel computation course. Because of my undergrad course, I learned very little form the grad course. Concurrency really isn't that advanced of a concept.

Re:As a Developer the Question I Have Is ... (1)

Chabo (880571) | more than 5 years ago | (#27867851)

I agree it's not that advanced, but there's not much room for it, with all of the other topics that need to be covered.

Here's an overview of the courses I took that were required for my degree:
-Intro to CS (C++, covered basic concepts, not even really getting into OO basics)
-Intro to CS, Pt 2 (C++, covered OO, classes, basics of pointers)
-Data Structures (Java, nothing but hashes, lists, trees, etc)
-Software Design (Java, mostly about how to structure OO designs well)
-Intro to C and Assembly (covered pointer arithmetic in detail, machine architecture, and other low-level concepts)
-Operating Systems (C, covered things like memory allocation, caching policies)
-Programming Languages and Concepts (first half in Java, dealing with threading and GUIs, second half in SML, covering functional programming concepts)
-Object Oriented Programming (C++, covered advanced OO concepts and designs)

Those are all of the courses required of every CS major at my school. We also had three "CS elective" slots, which we could fill with courses like networking, AI, graphics, or OS programming, but not every undergrad was required to take those, and they were mixed undergrad/grad classes, so I even if there was an advanced course on concurrency that covered it in further depth than "write a GUI with a worker thread", I didn't take it. As a result, I wouldn't feel comfortable designing a program that had threads interacting with each other without guidance.

Re:As a Developer the Question I Have Is ... (5, Funny)

I'mTheEvilTwin (1544645) | more than 5 years ago | (#27867279)

It's becoming obvious the number of cores is going to far outweigh the number of applications we'll be running five years from now

The number of cores (at least some chips) already outweighs the applications you can run if you run Winows 7.

Re:As a Developer the Question I Have Is ... (0, Troll)

Chabo (880571) | more than 5 years ago | (#27867339)

Only if you run Starter Edition [windows7news.com] , which is aimed at "emerging markets" only.

Re:As a Developer the Question I Have Is ... (1)

I'mTheEvilTwin (1544645) | more than 5 years ago | (#27867395)

I know. It was a joke. Ya know funny ha ha?

Re:As a Developer the Question I Have Is ... (1)

twidarkling (1537077) | more than 5 years ago | (#27867707)

It may have been a joke, but it certainly wasn't funny.

Re:As a Developer the Question I Have Is ... (0)

Anonymous Coward | more than 5 years ago | (#27867465)

It's not aimed at "emerging markets" only. Windows 7 Home Basic is.

Starter edition is to be pre-installed onto netbooks.

Re:As a Developer the Question I Have Is ... (1)

Chabo (880571) | more than 5 years ago | (#27867489)

Thank you for the clarification.

Re:As a Developer the Question I Have Is ... (1)

miffo.swe (547642) | more than 5 years ago | (#27867371)

One of the problems with multiprocessor applications is that many tasks doesnt become that much faster no matter how many cores you throw at them. I/O from disk and memory can often has much higher impact on performance than more CPU cycles. Often with even one core you spend countless of cycles wating for things to finish on the disk or in memory etc. With multiple cores even more cycles are wasted waiting.

More cores arent a solution to the brick wall that the chip makers have hit, its an interim solution until we get faster cores or better designed ones.

Some applications like browsers can benefit from more cores but its no use redesigning and reimplementing every app just for the fun of it.

As for servers one of the problems is that the current solution of running many services on one hardware is a bandaid. My hopes are native services that can be moved, load balanced between hardware and coexist without virtualisation and all the overhead it brings both in CPU, Mem and service.

Re:As a Developer the Question I Have Is ... (-1, Flamebait)

Anonymous Coward | more than 5 years ago | (#27867727)

This really has less to do with throwing cores at the problem, and more to do with fixing Firefox's crappy architecture.

I have a 3Ghz Core2 Duo, and Firefox's menus still lag when a page is loading. That's what happens when your browser core was written by top Netscape geniuses.

Re:As a Developer the Question I Have Is ... (1)

X0563511 (793323) | more than 5 years ago | (#27867859)

Once upon a time, the core(s) were the bottleneck.

Once the storage bogeyman is taken care of (as I'm sure it will eventually) what will be the new bottleneck?

This is the nature of the beast. Kill one, and more take it's place.

Re:As a Developer the Question I Have Is ... (1)

Chabo (880571) | more than 5 years ago | (#27868147)

In some applications, memory bandwidth is already the bottleneck.

Re:As a Developer the Question I Have Is ... (1)

MrMr (219533) | more than 5 years ago | (#27867417)

As another developer I have to ask: Where did you learn to program? Because this is standard part of any curriculum I know of since the early 1980's.

Re:As a Developer the Question I Have Is ... (2, Interesting)

Tony Hoyle (11698) | more than 5 years ago | (#27867767)

Really? Not that I noticed. I was tought Pascal, Ada, 68000 machine code, and they let us play with a little C off the record. Oh and Cobol, of course. No threading at all. That was around 1990.

Having talked to programmers who qualified more recently, it hasn't got any better except they now get to learn C 'officially'. It takes around 6-9 months for a new programmer to pick up how things are done in the real world after being through the education system.

Re:As a Developer the Question I Have Is ... (4, Insightful)

k.a.f. (168896) | more than 5 years ago | (#27867451)

Why isn't everyone doing this?

Because multi-threaded programming is really really hard to get right, and because most programs either are not CPU bound, or else have so much inherently non-parallel logic that the benefit would be marginal. Serving multiple independent tabs in a web browser is extremely amenable to parallelization, but almost everything else isn't.

Re:As a Developer the Question I Have Is ... (2, Informative)

Anonymous Coward | more than 5 years ago | (#27867455)

As chipmakers demo 64 or 128 core chips, why aren't we coding and being trained in Erlang?

Every mainstream programming language has facilities for multithread programming and there's no need to learn a new one just to do it.

Why aren't schools teaching this as a mandatory class?

Multiprocessing is a key theme of operating systems courses, which are in the core curriculum of all CS programs. Many other courses also cover synchronization primitives, IPC, and other topics useful for multithreaded programming.

Why aren't old applications being broken down and analyzed to multithread components that don't interact?

It's usually difficult to retroactively add such features to applications that weren't originally designed with them in mind.

Why isn't the compiler theory concentrating on how to automate this (if possible)?

Compilers do parallelize when possible. It's usually not possible without intervention by the programmer.

It's becoming obvious the number of cores is going to far outweigh the number of applications we'll be running five years from now (so you can't leave it up to the OS) so why isn't this a bigger concentration now in application development?

It is a major issue in modern application development.

I understand a lot of server side stuff can take advantage of this (in the nature of serving many clients at once) but it's only a matter of time before it's typical on the desktop.

Yup.

Re:As a Developer the Question I Have Is ... (1)

Tony Hoyle (11698) | more than 5 years ago | (#27867825)

Multiprocessing is a key theme of operating systems courses, which are in the core curriculum of all CS programs. Many other courses also cover synchronization primitives, IPC, and other topics useful for multithreaded programming.

If only it was.. life would be so much simpler.

In truth 'operating systems' often means little more than learning machine code. Schools teach the bare minimum the pass - it's not worth their while to start on non-core subjects. The average graduate I see can't even *spell* IPC let alone do it.

Re:As a Developer the Question I Have Is ... (1)

X0563511 (793323) | more than 5 years ago | (#27867933)

Why isn't the compiler theory concentrating on how to automate this (if possible)?

Compilers do parallelize when possible. It's usually not possible without intervention by the programmer.

I think he's wondering why more effort isn't being spent on getting the compiler to do it more intelligently. I don't know whether or not that is happening, I'm not in the industry.

A funny answer, but it's also the serious one (3, Insightful)

whiledo (1515553) | more than 5 years ago | (#27867485)

Because it's hard?

Re:As a Developer the Question I Have Is ... (5, Insightful)

Anonymous Coward | more than 5 years ago | (#27867515)

Erlang is a very poor choice for true multi-threaded programming. It does "lightweight" threads very nicely but real multi-CPU stuff is very slow. To the point that it negates using multiple processors in the first place.

While I like programming in Erlang, its performance sucks donkey balls. Even the HIPE stuff is pretty damn slow.

Plus the learning curve for functional languages is pretty high. Most programmers take a good bit of training to "get it", if they ever do. I have been programming in Erlang for about 5 years and even though I get it, I still prefer the "normal" programming languages like C/C++, Lua, Perl, whatever. I use functional tricks and I wish some of those imperative languages had more functional features but I think they work more like the human mind does and that helps me program better.

We do need something to make multiple-CPU programming easier though. Threaded programming in C/C++ or similar can turn into a nightmare real quick, it's error prone and complicated.

Re:As a Developer the Question I Have Is ... (1)

RiotingPacifist (1228016) | more than 5 years ago | (#27868073)

Wouldn't the point of the course be to teach them about threading (perhaps using erlang), they can then use those skills to thread in other languages.

Re:As a Developer the Question I Have Is ... (0)

Anonymous Coward | more than 5 years ago | (#27867541)

why aren't we coding and being trained in Erlang.

Because the name is kinda gay.

And Joe Armstrong doesn't have a beard.

Re:As a Developer the Question I Have Is ... (1)

nxtw (866177) | more than 5 years ago | (#27867547)

Why aren't schools teaching this as a mandatory class?

Because it is a niche language.

Why aren't old applications being broken down and analyzed to multithread components that don't interact?

Many programs already use multiple threads and were threaded before multi-core systems were common. The modern Windows shell (explorer.exe) has been multithreaded since it was introduced in Windows 95.

In general, anything obvious and easy to parallelize has probably been already.

Why isn't the compiler theory concentrating on how to automate this (if possible)?

See automatic parallelization [wikipedia.org] .

Re:As a Developer the Question I Have Is ... (1)

danhs7 (970647) | more than 5 years ago | (#27867763)

I believe we need better tools.

Right now, as others have noted, threading is hard and complex. Shared memory is tricky. In the shared memory threading model, one thread can modify data, while another thread is completely unaware that the data it is operating on has actually just changed! It's a very tricky model and can introduce all sorts of tricky, difficult to track bugs.

Separates processes are a lot simpler since each process has its own unshared memory. As of today, I don't believe there are enough tools to make managing concurrency simple.

People on slashdot (and elsewhere) keep on saying "a lot of programs won't benefit because they're sequential". Most program execution time is spent inside loops: do work on one thing then do work on the next thing. These can be run in parallel very easily. All we need are the right tools to make it simple.

We're starting to build the necessary tools. They're not there yet to make concurrency a "no thought necessary" free lunch. But, look at the tools that have already emerged (and are still quite young): the entire functional programming-inspired stack map/reduce etc, CUDA, and languages like Erlang and Haskell, etc...
A few years ago when I was looking for Python libraries to do concurrent programming it was quite difficult. Now the multiprocessing module is in the standard library of Python 2.6; that is a major step forward that makes multicore processing significantly simpler.

I think that big, high profile projects like this will encourage the necessary innovation to develop those tools: necessity is the mother of invention. When big open source projects hit new problem requiring new tools the broader community tends to benefit.

Re:As a Developer the Question I Have Is ... (3, Informative)

CajunArson (465943) | more than 5 years ago | (#27868007)

Erlang's great until the share-nothing approach leads to so much overhead in pushing bytes back and forth between processes that you are spending more time copying bytes than actually doing work. Not saying that normal thread models are always better, but there is no "perfect" multiprocessing model and Erlang has its own pitfalls. As for Firefox, you are basically running a series of stovepipes where it makes sense for each tab to have a separate process... why it has taken so freakin' long for this I don't know, but it's not a new idea (hell I posted it right here on Slashdot back when FF3 was just coming out... lemme check.... here [slashdot.org] .

Re:As a Developer the Question I Have Is ... (1)

needs2bfree (1256494) | more than 5 years ago | (#27868013)

IBM has a tool platform [ibm.com] that is useful for developing C/C++ projects on.

Re:As a Developer the Question I Have Is ... (1)

radarsat1 (786772) | more than 5 years ago | (#27868113)

Why do you think this isn't the case? There's plenty of research in exactly the areas you describe going on right now. It's all over the programming blogs and research papers, everywhere I look (when searching for programming-related topics) there is a tutorial on functional programming. Are you living under a rock or something?

responsiveness (5, Insightful)

Lord Ender (156273) | more than 5 years ago | (#27867129)

I think the main benefit of such a system would be responsiveness. It is very unpleasant when one tab temporarily causes the entire browser window to become completely unresponsive--including the STOP button or the button to CLOSE the misbehaving tab. The UI should never freeze for any reason.

Re:responsiveness (1)

anss123 (985305) | more than 5 years ago | (#27867333)

The UI should never freeze for any reason.

Sadly, IE8 still has this problem. Anyone know for Chrome?

Re:responsiveness (0)

Anonymous Coward | more than 5 years ago | (#27867483)

It doesn't. Chrome takes it a step furthur and uses a new proccess instead of threads for each tab. It's one of my favorite things about chrome... now if only it had firefox-like addons support.

Re:responsiveness (2, Informative)

Anonymous Coward | more than 5 years ago | (#27867629)

Um, IE8 does the exact same thing. It uses child processes to control groups of tabs by domain.

Of course, IE8 was doing it since the first public beta, over 5 months before anyone knew about Chrome. The implementation in Chrome is a near carbon copy. Who is copying whom?

Re:responsiveness (1)

Darkness404 (1287218) | more than 5 years ago | (#27868215)

No one is copying anyone, its a general trend. When you have tabs finally introduced to all major browsers including IE, people are going to get used to them and start to like them even more, and not just us geeks but the general public. At the same time you get multi-core CPUs in newer computers save for budget models. So, you have the perfect scenario in which to isolate tabs into different threads/processes. Mix that in with the general trend towards dynamic HTML pages using obscene amounts of JavaScript (previously most were done in plugins like Flash and Java), and you have a need to do it.

Re:responsiveness (1)

Captain Splendid (673276) | more than 5 years ago | (#27867385)

The UI should never freeze for any reason.

Whoah. Somebody hasn't used a Windows OS in a while, I see...

Re:responsiveness (1)

Drinking Bleach (975757) | more than 5 years ago | (#27867831)

The existence of MS Windows does not detract anything from his point. It only serves to demonstrate that Microsoft has not learned the lesson.

Re:responsiveness (2, Funny)

camperdave (969942) | more than 5 years ago | (#27867453)

It is very unpleasant when one tab temporarily causes the entire browser window to become completely unrespon...

sive--including the STOP button or the button to CLO...

SE the mi...

sbehaving tab. The UI should never freeze for any reason.


Hear! Hear! I don't recall any problems of this nature back on version 2.x of Firefox. And why does my bank's website think I'm running from a different computer every time there's a minor update to Firefox?

Re:responsiveness (1)

Drinking Bleach (975757) | more than 5 years ago | (#27867857)

Probably because your user agent has changed, and they detect that.

Re:responsiveness (4, Insightful)

timeOday (582209) | more than 5 years ago | (#27867655)

Multi-processing aside, I wish firefox had an option to NOT use any CPU (including scripts, plugins, etc) on tabs except the one visible. I do NOT want 30 different processes, all firefox tabs, using up all my cores just to run spam animations. Granted, I DO usually want tabs to at least download in the background, so maybe it's harder than it sounds.

Mod parent way up (0)

Anonymous Coward | more than 5 years ago | (#27867891)

I would love to see this as a core FF engine option -- a setting that says "Don't waste any processing power on anything other than what's right in front of me."

Re:responsiveness (3, Insightful)

Darkness404 (1287218) | more than 5 years ago | (#27868303)

Sure, but there are a lot of problems with that for the general public. For example, a lot of people (including me) fire up YouTube, Pandora, or other web-based music services in another tab then listen to the music and then browse in different tabs. I also usually open up Facebook in another tab, and like the fact that if I get a message it alerts me with a sound so I can go back to the tab.

Sure, it would be useful as an option, but I think this is more add-on territory because of how little it would benefit most people.

Re:responsiveness (1)

RiotingPacifist (1228016) | more than 5 years ago | (#27868233)

This can be achieved in threads, i really hate the idea of jumping to a one process per tab model when it doesn't offer the advantages being promised. If this is going to be done, it needs to be done for the security benefits and that requires OS/distro cooperation!

Responsiveness / multicore use / tab crashing can all be done using threading
Security is the only reason to use separate processes and IMO i don't want to take a per-tab performance hit when browsing slashdot/youtube/gay^H^H^Hporn/etc, per tab stuff should only come into play on HTTPS sites (along with protection from malicious(or simply exploited) extensions).

Finally! (5, Interesting)

nausea_malvarma (1544887) | more than 5 years ago | (#27867137)

About time, mozilla. I've used firefox since it came out, and lately I've noticed it's not the hot-rod it once was. The web is changing - full of in-browser videos, web apps, and other resource intensive content, and firefox has had trouble catching up. I look forward to better speed and stability, assuming this project is seen through it's completion.

Otherwise, I'd probably switch to google chrome eventually, which doesn't have the add-on support I enjoy from firefox.

Re:Finally! (1)

eldavojohn (898314) | more than 5 years ago | (#27867229)

The web is changing ...

This is about hardware changing, not the web. If the CPU manufacturers were still concentrating on X Ghz chips instead of Y core chips, Mozilla wouldn't be doing this. Intel and AMD have spoken and the software world better pay attention.

Mozilla is interested in providing a better user experience and they're correct in taking full advantage of your hardware. As multicore chips become cheaper and cheaper to fabricate and they show up in netbooks with low frequencies, this is going to pay off big time.

Re:Finally! (1, Flamebait)

ShadowRangerRIT (1301549) | more than 5 years ago | (#27867233)

The web is changing - full of in-browser videos, web apps, and other resource intensive content, and firefox has had trouble catching up.

Of course, with add-ons to Firefox like Adblock Plus, FlashBlock and NoScript, all that crap becomes Opt-In. Aside from occasional problems with the Java plugin (which I need for a specific site), I've never felt that Firefox was slowing me down. Chrome felt slower despite handling JavaScript faster, because it had to run the JavaScript, period.

Re:Finally! (1)

Captain Splendid (673276) | more than 5 years ago | (#27867389)

and lately I've noticed it's not the hot-rod it once was.

And it doesn't crash like it used to back in the early 1.x days. Sure, it's a little bloated, but I'll happily compare my FF uptime stats with at least Windows Server.

Re:Finally! (1)

RiotingPacifist (1228016) | more than 5 years ago | (#27867929)

Try out minefield, its pretty fast and rarely crashes on me (literally twice in ~6 months of running it), rendering is fast, startup time is pretty good and generally firefox 3.5 is the fasted browser I've seen (granted im on Linux but it compares favorably to chrome on my friends windows box, and the Linux version does even have PGO yet)

Changing to a multiprocessor system is going to mean a performance hit and only provides a marginal security benefit, Firefox's main security hazard are its extensions, ofc if they get a similar lock down and UAC/SElinx/apparmor or something similar can prevent them from messing with https rendering (or each other as was recently a problem with noscript+adblock) then it's worth it.

Another good article on this (-1, Troll)

Anonymous Coward | more than 5 years ago | (#27867139)

here [nimp.org]

Relief (2, Insightful)

elashish14 (1302231) | more than 5 years ago | (#27867159)

This is great. I'm sick of that stupid integrated PDF viewer made by Adobe that always crashes my whole browser. Now it'll just crash a tiny bit.

Re:Relief (1)

A beautiful mind (821714) | more than 5 years ago | (#27867317)

So why are you still using it then? Why can't you use kpdf or document viewer that is built into Gnome?

Re:Relief (1)

Velorium (1068080) | more than 5 years ago | (#27867885)

Because not all of us run Linux and this still affects average users that are the lemmings who give the most market share. Mozilla doesn't want to be blamed for the whole browser crashing when it's really Adobe's fault and yet Microsoft and Google have precautions to avoid a full crash. When the competitor has something you don't that allows for a smoother user experience, the users are more likely to stray away from your more rigid product.

So here's the $10,000 question... (2, Insightful)

MoOsEb0y (2177) | more than 5 years ago | (#27867213)

Does the process separation prevent badly-behaved plugins needed for a good portion of websites in existence these days *cough*flash*cough*acrobat*cough* from killing your browser when they inevitably decide to break? Both plugins have been killing me on both win32 and linux. Noscript and mozplugger or foxit help to some degree, but firefox is by far the most unstable program I use these days because of plugins.

Re:So here's the $10,000 question... (1)

RiotingPacifist (1228016) | more than 5 years ago | (#27867637)

it depends how its done, but the performance hit in the past has been pretty bad. This is how nspluginwrapper works and apparently running 32bit flash on a 32bit system still took a noticeable performance hit. IMO it's better to just do this in threads but keep a close eye on the plugin threads.

How about threads? (2, Interesting)

node159 (636992) | more than 5 years ago | (#27867249)

Processes vs Threads...

I'm pretty certain that the usual 40-60 pages I have open are going to blow the memory if each runs in its own process.

Re:How about threads? (2, Informative)

mishehu (712452) | more than 5 years ago | (#27867425)

And I thought that Firefox was already multithreaded, and thus already multi-processor supported... this would just simply be a different approach to the same scenario - how to split up the tasks over multiple cpus...

or am I wrong about it being multithreaded?

Re:How about threads? (3, Interesting)

TheRaven64 (641858) | more than 5 years ago | (#27867571)

No. Just no.

On any modern system, there is very little memory overhead to having multiple copies of the same process. They will share read-only or copy-on-write versions of the executable code and resources loaded from shared libraries and the the program binary, as well as any resource files opened with mmap() or the Windows equivalent. The only real overhead is relocation symbols, which are a tiny fraction of most processes. In exchange for this small overhead, you have the huge benefit of having completely isolated instances which only communicate with each other through well-defined interfaces.

Threads are an implementation trick. They should not be exposed as a programmer abstraction unless you want people to write terrible code. Go and learn Erlang for how parallel code should be written.

Re:How about threads? (2, Informative)

nxtw (866177) | more than 5 years ago | (#27867613)

Do mods know nothing abuot modern operating systems?

A properly implemented application using a multi-process model should use only slightly more memory, thanks to shared memory [wikipedia.org] , a feature of any modern operating system.

Re:How about threads? (2, Informative)

dltaylor (7510) | more than 5 years ago | (#27867679)

If it is threads, then the common parts are sharing literally the same memory, although you do pay for some locks.

If processes, which would be more robust, then the common parts should be in .so/.dll to share the code (common data could be in library-allocated memory, but cleanup is tricky on M$-Windows), and per-instance data is part of the process, which, when a window (tab, too, I suppose, but I don't use them) is closed, would free the memory. Reducing the amount of common storage to simplify its management and having each instance's data in its own space would actually help in Firefox' case, since they currently don't do that very well.

Re:How about threads? (0)

Anonymous Coward | more than 5 years ago | (#27867725)

This is an honest question, and I don't mean to insult you in any way, but why in the name of fuck do you have 40-60 pages open at a time? I think you're doing it wrong.

Re:How about threads? (1)

Pentium100 (1240090) | more than 5 years ago | (#27868235)

I'm the same way. This usually happens for me when I am reading some long text with a lot of links in it. I see a link, open it in a background tab and continue reading...

Also, I usually keep a lot of tabs open to the sites I frequently visit, so I just select the tab and refresh the page to see if the site (a forum or /. main page) changed. On some sites I do not need to refresh, since they refresh automatically.

Yes, I know, I should use bookmarks, but maybe it's just a bad habit, but a lot of tabs is easier for me. So, if the new FF version has a process for each tab, my Task Manager list will be full of firefox.exe (now if Opera does this too, it will be bad).

Re:How about threads? (3, Interesting)

RiotingPacifist (1228016) | more than 5 years ago | (#27867765)

I tried explaining this on DIGG, but to not have the title understand it on Slashdot is depressing!
I think there is an advantage to processes pre tab against a code injection attack
Also if you had Firefox-gui, Firefox-net, Firefox-Gecko, Firefox-Profile, Firefox-file you could give each one a different SElinux/apparmor/UAC profile.

Im not sure what the performance trade off would be like so i sincerely hope that there is a single binary compiler option. I also think that a good balance to prevent the security hit on per-tab processes is to only put https tabs in separate processes (additionally it would be smart to prevent extensions running on these pages (GUI extensions would still work, but nothing that touched the page).

Are processes even needed for security though? can threads be locked down to achieve this without the performance hit? (and additionally, lock down extensions?)

Re:How about threads? (1)

jd (1658) | more than 5 years ago | (#27868069)

You think that's bad? A friend of mine routinely runs 400+ tabs. (She is forced to use Firefox 1.x as nothing newer is capable of handling this kind of number.) Can you imagine the resource hit that would take by using processes?

I guess it can be useful in... (3, Interesting)

MoFoQ (584566) | more than 5 years ago | (#27867251)

I guess it can be useful in determining which site I visit tends to create the memory leaks I still experience (even with ff3).
(as I type, this current browser session has ballooned to over 600MB...which is still better than my typical with ff2...which was 700-800MB)

maybe they can dedicate a process just for "garbage collection".

Catchy Name (5, Funny)

tmmagee (1475877) | more than 5 years ago | (#27867271)

How about FireFork?

Re:Catchy Name (4, Funny)

Improv (2467) | more than 5 years ago | (#27867321)

I'd mod this up if I had the points. Flames behind a fork would look really stylish... although now you've got me thinking of Fondue...

Re:Catchy Name (1)

Beat The Odds (1109173) | more than 5 years ago | (#27868297)

I'd mod this up if I had the points. Flames behind a fork would look really stylish... although now you've got me thinking of Fondue...

Let's go with it.... FondueFox.... got a nice ring to it....

Re:Catchy Name (0)

Anonymous Coward | more than 5 years ago | (#27867347)

Satan's favorite browser!

Re:Catchy Name (1)

MBCook (132727) | more than 5 years ago | (#27867865)

How about Miles Prower [wikia.com] ?

Re:Catchy Name (0)

Anonymous Coward | more than 5 years ago | (#27867993)

mool-ti-fox.

A simple implementation (1, Interesting)

Anonymous Coward | more than 5 years ago | (#27867337)

Now, this sample browser with process isolation took a couple of hours to develop:

http://ivan.fomentgroup.org/blog/2009/03/29/instant-chrome/ [fomentgroup.org]

Feature was not "badly" needed (0, Flamebait)

bogaboga (793279) | more than 5 years ago | (#27867357)

Like Chrome or Internet Explorer 8 which have implemented this behavior to some degree, the main benefit would be the increase of stability: a single tab crash would not take down the whole session with it, as well as performance improvements in multiprocessor systems that are progressively becoming the norm.

While I believe this feature would improve Firefox in a big way, I also believe it was not badly needed at present because I have found Firefox to be pretty stable on all systems I have used it.

What I would have wanted to see is implementation of uniformity across all platforms especially Windows and Linux. Its user experience on Linux is still wanting from configuration options in unfamiliar places to that "old weird look and feel" one gets on the Linux platform.

Since QT 4.5 is not LGPL...how about re-creating its interface using QT like folks at VideoLan [videolan.org] did. This would go a great way in improving the user experience.

I guess such a move would break compatibility with the thousands of extensions now available for Firefox, but folks, we must move on from time to time.

Am I wrong and unrealistic?

Re:Feature was not "badly" needed (1)

Burkin (1534829) | more than 5 years ago | (#27867473)

Since QT 4.5 is not LGPL...how about re-creating its interface using QT like folks at VideoLan did. This would go a great way in improving the user experience.

Welcome to last year. http://arstechnica.com/open-source/news/2008/08/nokia-helps-port-firefox-to-qt.ars [arstechnica.com]

Re:Feature was not "badly" needed (1)

RiotingPacifist (1228016) | more than 5 years ago | (#27868023)

Any news since then, I've not played around much with my system because of exams but, last time i looked the QT port had once again died! This isn't the first time this has been tried/failed either :(

The problem is not threads vs processes... (3, Insightful)

faragon (789704) | more than 5 years ago | (#27867393)

... is to surrender in order to accept buggy as hell plug-ins or memory leaks as "acceptable".

Current multithreaded Firefox is able to use multiple CPUs, being the reason of splitting the tabs into independent processes is to surrender to mediocrity. How about increasing Q&A, do proper synchronization between components, and don't allow untested components to be used without showing a big warning at installation?

Re:The problem is not threads vs processes... (4, Insightful)

MBCook (132727) | more than 5 years ago | (#27867585)

Until Mozilla has control over Flash, most internet uses will have to put up with buggy plugins. This is about being defensive instead of just getting shot.

Re:The problem is not threads vs processes... (1)

acidrainx (806006) | more than 5 years ago | (#27867937)

I don't remember the last time Flash crashed my browser. Poorly written JavaScript takes down Firefox far more frequently for me.

The only thing that really gives me grief is Adobe Reader, but that's easily fixable by using the PDF Download [pdfdownload.org] add-on for Firefox or using a different PDF reader, like Foxit [foxitsoftware.com] .

Re:The problem is not threads vs processes... (3, Insightful)

entgod (998805) | more than 5 years ago | (#27868189)

But why should flash crashing take down all of firefox? Why couldn't we just encapsulate flash in it's own process or something?

Re:The problem is not threads vs processes... (1)

danhs7 (970647) | more than 5 years ago | (#27867877)

This seems like a silly argument.

Why would you not want to make a more robust browser? You have to first accept that the application will never be perfect, will always have *something* wrong. Then it's an easy decision to choose to build a robust browser which can fail elegantly and minimize the effects of flaws.

the real question is... (3, Interesting)

Tumbleweed (3706) | more than 5 years ago | (#27867437)

Will Chrome mature to have a nice system of plugins to match the advantages of Firefox before Firefox rearchitects this very low level code?

I sometimes wonder about the FF devs - I've been wondering about the lack of a multi-threaded (at least) UI for a few years now. That project kept getting put off and put off until there was too much code to change easily. Only now that a real competitor comes along do they bother with the obvious thing that should've been put in from the start. Do FF devs not actually USE FF? Or do they not browse sites with Flash apps that go out of control and make the browser completely unresponsive? I find that hard to believe.

Whatever. At least it'll finally happen. One wonders how many people will have switched over to Chrome by the time they get this out the door, though.

LOL! You Have To Be Joking... (0, Flamebait)

Anonymous Coward | more than 5 years ago | (#27867837)

"Will Chrome mature to have a nice system of plugins to match the advantages of Firefox before Firefox rearchitects this very low level code?"

Chrome already has plugin support well along in development.

And your wondering if a complete top to bottom rewrite of the stinking pile of shit codebase that is Firefox is going to arrive sooner?

LOL!

How many years did it take the clowns to even admit to FF's massive memory/resource leaks, let alone actually finally do something to less them?

Re:LOL! You Have To Be Joking... (1)

Tumbleweed (3706) | more than 5 years ago | (#27868021)

> "Will Chrome mature to have a nice system of plugins to match the advantages of Firefox before Firefox rearchitects this very low level code?"

Chrome already has plugin support well along in development.

And your wondering if a complete top to bottom rewrite of the stinking pile of shit codebase that is Firefox is going to arrive sooner?

Yes, it's got plugin _support_, but notice I said 'a nice system of plugins' - that is quite different. Having the capability to use plugins with very few plugins (and no _mature_ plugins) is another situation altogether. I would say only a few dozen particular plugins are critical to cover the majority of needs, though, so it shouldn't be that hard, compared to fixing FF.

Interest dynamic between Firefox and Chrome: (4, Insightful)

darpo (5213) | more than 5 years ago | (#27867461)

They both have geek-cred, but Chrome people say Firefox is unstable, while Firefox people complain Chrome has no extensions. So it's a race between the two browsers: will Firefox get tab isolation before Chrome, or will Chrome get extension support before Firefox? Either way, we users win.

Re:Interest dynamic between Firefox and Chrome: (1)

silent_artichoke (973182) | more than 5 years ago | (#27867813)

It's almost as if innovation was being caused by competition!

I kind of like single-processor apps. (4, Insightful)

Sowelu (713889) | more than 5 years ago | (#27867477)

The advantage of single-processor apps in a less-than-perfect OS, is that when the app decides to chomp up all the CPU that it can grab, it doesn't cripple your machine. Moving from one to two cores for me has meant that browsers can't suck down 100% of my CPU and prevent me from even closing them for minutes at a time. This had better not let Firefox use up 100% of my machine again.

Re:I kind of like single-processor apps. (1)

RiotingPacifist (1228016) | more than 5 years ago | (#27867961)

multi-threading is all they need to lock up your system, but ofc more than one thread/process needs to be chomping at the same time!

Re:I kind of like single-processor apps. (4, Insightful)

Eunuchswear (210685) | more than 5 years ago | (#27868205)

If a process using 100% of your cpu "cripples" your machine your OS is broken,

Tab Crash? (0)

Anonymous Coward | more than 5 years ago | (#27867609)

When was the last time a broken tab brought down your whole browser without a java applet being involved?

Re:Tab Crash? (1)

MikeUW (999162) | more than 5 years ago | (#27868127)

The last time I viewed a page with Flash in it.

Project Name: (0)

Anonymous Coward | more than 5 years ago | (#27867753)

The project name should be: Late to the Partyzilla

Great! (0, Flamebait)

Jherico (39763) | more than 5 years ago | (#27868011)

So now when firefox wigs out and starts chewing up all available CPU cycles, it will take up 100% of my cycles instead of the 50% available to one CPU.

Makes Firefox/browser platform of the future (2, Insightful)

danhs7 (970647) | more than 5 years ago | (#27868015)

For the last few years Google's strategy has been to make the browser the platform of choice. That would make the whole Windows, Linux, Mac, mobile whatever choice irrelevant.

Making Firefox act more like a real operating system, each "application" runs in its own process is another step in that direction. It means that my gmail browser window won't crash if I surf to some buggy website. And it means that I can run a lot of browser based application faster and more stably.

This is the next logical step for people to start using Google word processor running in firefox instead of Word or OpenOffice. Once there's a stable browser based platform for browser applications to run in, a whole world of possibilities begins to opens up.

You mean... (0)

Anonymous Coward | more than 5 years ago | (#27868117)

Google's in-house browser and Microsoft's closed source browser are both ahead of an OSS project in terms of features because they're not reacting to market leaders? (I am aware that Chromium is open source, but Google does not solicit patches from the community)

This is completely unlike Looking Glass/Aero/Compiz, and is completely dissimilar from Office/OpenOffice, and I doubt the situation has anything in common with .Net/Mono.

Load More Comments
Slashdot Login

Need an Account?

Forgot your password?