Firefox is slow - troubleshooting
support.mozilla.com
support.mozilla.com
Firefox (3.6) seems to have a really nasty problem in its garbage collection system. If I leave it open for more than a couple of days, under normal use, it starts hanging for a couple of seconds every minute to half-minute -- and it hangs for longer, more often, the longer I leave it open.
Closing and restarting Firefox seems to clear the issue up. At least, for a while.
The only reason I still use Firefox is because of AdBlock Plus. The moment someone comes up with a replacement that's as good, I'm done with it and never looking back.
edit: oh, and by the way: this bug, combined with Google "Instant"? Very not the best thing ever.
Also, Chrome is still not available for my aging PPC.
My biggest problem with Firefox (v4 only) is shutting it down takes ages as it iterates through every file in the cache, which is encrypted on my machine. I limited my cache size to 50MB, which seems to have limited the pause times to something reasonable.
I cannot stand Chrome though; I hate the way it selects text on the page with the mouse (I'm a compulsive selection-reader), and the cobbled-together extension replacements for the Bookmarks menu don't work nearly as well as a proper menu.
But, I've seen similar behavior on at least one other system, and the only extension we had in common there was AdBlock Plus. The behavior also predates Greasemonkey.
The other system is newer, and the slowdown there is less pronounced (though still noticeable), which leads me to suspect that there's some task that runs regularly that performs well enough on fast enough systems to be less problematic, but becomes a miserable dog on older systems -- a pretty typical case of programmer "fast enough for me".
Apropos of nothing: I don't get you compulsive selection readers. I'm always a little bemused when one of you speaks up. Why do you do that? It's so weird. :-)
Furthermore, firefox 4 does have some separate processes (not per tab). Note that chrome's default is not per-tab either.
I have trouble taking that at face-value; Linux seems to do OK with it and, for a while, there was a little-bitty web browser for Macs called Stainless (http://stainlessapp.com/) that did one-process-per-tab, and it seemed quite performant. Better, in fact, than all other browsers at the time. Unfortunately, it hasn't been updated in about a year now...
> Note that chrome's default is not per-tab either.
Oh yeah, somebody pointed that out to me back on that Reddit thread, too. I forgot. Still, I really think it should be, and that it should be considered standard practice for all browsers.
A while back, my frustrations with browsers resulted in a quickie project that I called "Crash My Browser" (still up at http://crashmybrowser.com/). I haven't tested it with recent browsers, but, once upon a time, at least one of the tests on that page could completely cripple not just that page's tab, but the entire browser, for most browsers. Since nobody seemed to get why that was a really stupid design flaw, I figured a demonstration was in order.
That said, in general, IPC is slower than threading for the simple reason that processes are in different address spaces. When you perform an IPC call, you must take a TLB hit. With communication between threads, there is only context switching overhead (assuming no preemption between calls.)
Chrome has a few different ways to do tab communication, none of which are truly "one process per tab".
https://wiki.mozilla.org/Electrolysis
If that page is to be trusted, Firefox on Android already does it.