Live data from Hacker News

Multiprocess Firefox

billmccloskey.wordpress.com

31–40 of 126 posts

Re: Multiprocess Firefox

#31
post #13
post #7

Earlier quoted context omitted.

Personally I prefer message passing (over pipes). Shared memory (be it shm/heap in same process) with associated mutexes, semaphores, locks and the like is a right pain to get right without introducing race conditions, deadlocks etc. Go is interesting as it uses "micro threads" (goroutines) and message passing CSP style but I haven't found a use for it yet.

> Go is interesting as it uses "micro threads" (goroutines) and message passing CSP style but I haven't found a use for it yet. But is also has shared heaps by default. So you still have to rely on everyone being an "adult". I wish shared heaps would have been a specially enabled feature not the default. But I guess the language was position to compete with C++ and Java and isolated heaps would have provided a perfor…

"I wish shared heaps would have been a specially enabled feature not the default."

I hope to someday see the language at least do the opposite, have a specially-declarable "isolated" goroutine. In theory, the compiler ought to be able to analyze a goroutine, determine that it shares no data at startup with another process (i.e., nothing in a closure or something), determine that it only communicates via value-passing channels (which courtesy of my previous restriction, can be analyzed by simply looking at what channels are passed in at startup time, and some analysis of the types of the channels), and thus guarantee that at least this goroutine is fully isolated. Pervasive usage of the new keyword I'm hypothesizing would allow a diligent programmer to recover most of the isolation advantages without having to rewrite Go entirely. It also ought to enable some other optimizations against these guaranteed-isolated goroutines, the biggest of which is that they no longer need to participate in a global stop-the-world GC, both in that they can continue running while that is occurring and that they also relieve the global GC from the task of scanning over them.

(In fact all the analysis ought to itself be fully automateable, and the user shouldn't have to declare it; I'd want them to still have the option to make a declaration so the compiler can tell them if they screwed up, though. I don't like such critical functionality being behind an opaque optimizer.)

But this certainly won't happen soon; there's a large enough list of stuff that comes before that.

Re: Multiprocess Firefox

#32

My biggest problem with Firefox is its startup time. It takes much longer to start the firefox.exe then IE and Chrome which are both very fast. I am using Win7 on i7-3960X, intel SSD, 16 GB RAM. If I install any plugin then this thing is much worst. (For this reason I am not using any plugin which is a big loss). It is weird that this issue is seldomly mentioned, but I think that it is much more important then the ot…

Have you tried the "reset" procedure? I don't think what you're experiencing is normal.

http://support.mozilla.org/en-US/kb/reset-firefox-easily-fix...

Re: Multiprocess Firefox

#33
post #24

I welcome this just so we can determine which tabs are using the CPU persistently. I had to switch back to Chromium (after a good few weeks really giving FF another go) because I was sick of this issue. Firefox is smoother and more memory friendly than Chromium these days, a pleasure to use, but in Chrome I can kill hoggy tabs... so that's where I'm staying for the moment.

Now, this isn't snarky, but you really run into issues like that, where its noticeably bad in a particular tab, enough to need to kill it? What sort of sites, and what processor?

Re: Multiprocess Firefox

#34
post #28
post #6

Earlier quoted context omitted.

Very nice indeed, I crash Firefox a few times a day from hitting the memory limit. Granted this is due to AB+ and Reddit Enhancement Suite. Although imo.im leaking memory over time doesn't help! (I am somewhat annoyed that an IM client takes up 500MB of memory, I miss Meebo!) Right now FF is at a fairly svelte 1.8GB. Heh. The other problem is that performance degrades dramatically as the number of open tabs increases…

>Once I hit 50 or so tabs scrolling becomes horribly jerky That could be a GPU driver issue. GPU scheduling is generally horrible outside the "run a fullscreen game as fast as you can and screw everything else" usercase.

Well in hopeful theory land those other tabs that aren't active shouldn't be hitting my GPU. :)

I can also pop over to IE and it scrolls a-ok! (To be fair, IE11 has beautiful scrolling, everything else looks jerky in comparison, it really is quite a lovely effect!)

But all my plugins are in FF, so.... with an SSD it is not like FF takes too long to come back up anyway! Still annoying though!

Re: Multiprocess Firefox

#35
post #23

For those of you interested in parallelism in browsers, I suggest you keep an eye on Mozilla's experimental new browser engine, Servo.[1] The goal is to make use of a variety of concurrency strategies (such as a Chrome-esque process-per-tab design[2]) and Rust's built-in support for memory-safe concurrency abstractions (fork/join, lightweight tasks, SIMD, etc.) to produce a ludicrously parallel[3] web browser. And ev…

I'll admit I wasn't a fan of process-per-tab originally either. However, since ever browser leaks memory, the ability to close some windows and reclaim the memory that was lost has been very useful to me (I tend to have 50+ tabs open at most times, and for many days at a time).

That being said, I'd also be ok with process-per-window, as that would give me the same basic ability.

Re: Multiprocess Firefox

#36
post #33
post #24

I welcome this just so we can determine which tabs are using the CPU persistently. I had to switch back to Chromium (after a good few weeks really giving FF another go) because I was sick of this issue. Firefox is smoother and more memory friendly than Chromium these days, a pleasure to use, but in Chrome I can kill hoggy tabs... so that's where I'm staying for the moment.

Now, this isn't snarky, but you really run into issues like that, where its noticeably bad in a particular tab, enough to need to kill it? What sort of sites, and what processor?

In Chromium it's generally runaway memory hogging tabs. Facebook is generally awful for example. Leave any Facebook page open all day (background of course, possibly on another virtual desktop) and you'll be staring at a multi-GB tab by evening.

I'm not sure what's causing the CPU utilisation in Firefox. It's common to blame extensions in the FF community because there's no easy way to determine where the problem is.

Re: Multiprocess Firefox

#37
post #30
post #7

Earlier quoted context omitted.

Personally I prefer message passing (over pipes). Shared memory (be it shm/heap in same process) with associated mutexes, semaphores, locks and the like is a right pain to get right without introducing race conditions, deadlocks etc. Go is interesting as it uses "micro threads" (goroutines) and message passing CSP style but I haven't found a use for it yet.

Going multiprocess and using IPC doesn't intrinsically eliminate any of the tricky concurrency challenges with multi-threading. Neither do coroutines (goroutines). When you have multiple processes talking to another then, unless all your RPCs are completely stateless, you still need to orchestrate synchronisation in some form. There's also the problem that in 2013 we still don't really know how to do IPC/RPCs really…

True, but it does help making the applications more resilient specially if they are stateless.

The "let it crash" model from Erlang and micro-kernels.

Still you are right, we are far from having an acceptable solution that we could apply everywhere, so to say.

Re: Multiprocess Firefox

#38
From a code maintainance point of view, how do you manage to keep this 'branch' in track with the main one ? I mean, every patch made to the real firefox has to be carefully reviewed and backported to this multiprocess branch. Is that a manual process ? Or can it be automated like that :

1) Check if new commit arrived on 'head' 2) Auto backport it to the multiprocess branch 3) Try a build + run tests. Everything looks good ? Keep it 4) Not goot ? Send an email to the multiprocess maintainer so that he has a look ?

Is there another way to do that ?

Re: Multiprocess Firefox

#40

Not sure why we need this. Without plugins (flash, java, silverlight) , firefox IS pretty stabled.

Because my firefox often freezes for a while when I open something like video section of thedailyshow.com

Given how cheap memory is, and the fact that almost all new devices are multicore I see this as a big positive.

Post reply on HN