Want to read Slashdot from your mobile device? Point it at m.slashdot.org and keep reading!

 



Forgot your password?
typodupeerror
×
Mozilla

Testing a Pre-Release, Parallel Firefox 278

Firefox, in its official version, still lacks support for multi-threading (running on different processors), though Chrome and Internet Explorer 8 both have this feature. A Firefox project called Electrolysis is underway to close this gap. A blog author tested a pre-release version of Firefox that loads different tabs in parallel, and he chronicles his findings, including a huge speedup in Javascript vs. Firefox version 3.5 (though the pre-release still lags Chrome in many of the tests).
This discussion has been archived. No new comments can be posted.

Testing a Pre-Release, Parallel Firefox

Comments Filter:
  • Good thing (Score:4, Insightful)

    by Darkness404 ( 1287218 ) on Tuesday January 05, 2010 @12:59AM (#30651364)
    This is a good thing. Firefox desperately needs to modernize. About the only killer feature left in Firefox is customization. Other browsers have already caught up to Firefox in speed, features, and standards support.
    • Re:Good thing (Score:5, Insightful)

      by Qubit ( 100461 ) on Tuesday January 05, 2010 @01:16AM (#30651476) Homepage Journal

      Other browsers have already caught up to Firefox in speed, features, and standards support.

      Many mainstream browsers are speedy, or at least speedy enough, but Firefox does offer a unique mix of features:

      Ogg Theora/Vorbis: Currently supported by Firefox, Chrome, Opera
      FOSS: Firefox, Chrome (just Chromium?)
      Cross-Platform on Win, Mac, GNU/Linux: Firefox, Chrome (maybe just beta?), Opera

      For me, both Firefox and Chrom{e|ium} look like good contenders. I've had good experiences with Mozilla products for quite some time, so I'll probably continue with Firefox.

      • Re:Good thing (Score:5, Insightful)

        by Darkness404 ( 1287218 ) on Tuesday January 05, 2010 @01:25AM (#30651532)
        And really, Chrome is -the- browser to beat right now. If it had a more stable Linux version and had all the addons/themes along with the ability to customize absolutely everything, chances are most Linux distros would ship with it over Firefox.

        Yeah, Firefox and Chrome may be the only two competitors with some features, but compared to others, Firefox just can't compete. Things like supporting multi-threading, tab isolation, plugin isolation, JavaScript execution speed, and general UI responsiveness are all things that Firefox really lacks. Right now, the ability to customize and the fact that its available in Ubuntu without needing extra repos, are about the only things that are keeping me from using Chrome full time.
        • Re:Good thing (Score:4, Interesting)

          by SanityInAnarchy ( 655584 ) <ninja@slaphack.com> on Tuesday January 05, 2010 @02:58AM (#30652012) Journal

          If it had a more stable Linux version

          What? The beta is pretty rock solid for me. There's one annoying, persistent bug in HTML5, which I haven't bothered to get annoyed about since I don't really see enough HTML5 video to care.

          But until fairly recently, Flash was crashing a lot for me. That meant I ran Konqueror a lot, because crashing an entire window full of tabs is still better than crashing all windows full of tabs.

          I ran the Chrome nightly builds until there was a stable beta. There were occasional and annoying bugs, but I would often go for weeks without problems. Worst case, a tab crashes, you hit refresh -- but days and weeks pass between those. Honestly, the released version of Firefox was less stable overall, at the time.

          had all the addons/themes

          I'm not sure how good it's going to be, or how likely it is to work at all, but I did hear people proposing ways for Chrome to run Firefox extensions. However, it does have plenty of its own.

          along with the ability to customize absolutely everything

          I'll definitely give you that. There are things I've seen Firefox extensions do that Chrome extensions can't touch, yet. But that's actually a nice tradeoff -- Chrome extensions are somewhat limited, but it means that if you try to install, say, the YouTube downloader, it'll only touch your data on Youtube.com, it'll say so, and Chrome will enforce it.

          Still, I think it's possible to have our cake and eat it, too.

          the fact that its available in Ubuntu without needing extra repos

          Why is this a blocker?

          I guess, from a privacy/security standpoint, I could see an argument, but from sheer usability, you can actually point and click on a deb to both download Chrome and automagically enable the extra repos.

        • Re: (Score:3, Interesting)

          by macshit ( 157376 )

          I've found chrome to be a decent brower, and the tab-process thing is very cool, but it doesn't quite live up to the hype I think. It isn't significantly faster than FF on my system (mostly FF falls down in specific, but fairly rare, situations), the UI isn't notably better, and in many ways it's a lot less polished than FF. E.g., if you enable emacs-style editor commands in GTK (which applies to text-entry boxes), they "kinda" work in chrome, but it also steals some keystrokes it shouldn't, which can be

          • Chrome may be Faster but it lacks so many basic features that I consider it a non-starter.

            * no cookie handling. You can accept all cookies, all cookies from the primary domain, or no cookies at all -- and nothing more. Chrome lacks even such a basic feature as session cookies! Firefox's default handling at least allows you to ask whether you want cookies from a given domain or not.
            Privoxy is no good, since it doesn't allow you to whitelist domains without logging on to your proxy server, editing the conf

        • If it had a more stable Linux version and had all the addons/themes along with the ability to customize absolutely everything,

          Oh please no.

          Once upon a time, I used a web browser named Mozilla. It was a nice, speedy alternative to Netscape and IE. Then somebody decided that Mozilla needed tons of addons, themes and the ability to customize absolutely everything. Launch time went from nice and quick to slow and incredibly painful, and rendering all that crap bogged down the system.

          But that was ok, 'cause

          • Re:Good thing (Score:5, Informative)

            by msclrhd ( 1211086 ) on Tuesday January 05, 2010 @05:21AM (#30652798)

            There is nothing that mandates that you must have tons of addons installed. Yes, they are available and some are useful, but they are not required.

            Firefox startup time being slow (and yes, the more addons you have, the slower it will be) falls into the following areas:
                * disk I/O (which is not dependent on CPU speed);
                * element reflow analysis being called a large number of times (this is a fancy way of saying where everything is positioned on the page - which, yes, does include the UI);
                * element reflow analysis takes a long time each time it is performed;
                * javascript performance.

            The Firefox team are working on, investigating and making improvements to these areas.

          • by sznupi ( 719324 )

            Funny thing is - Seamonkey is for some time noticeably more responsive, speedy and generally able to withstand much heavier browsing than Firefox.

      • by smash ( 1351 )
        Well, problem is:

        ogg - no one (general public) really cares. FOSS - no one really cares. Cross platform - no one (general public, again) really cares.

        The general public care about stability, outright speed and UI response.

        I gave up on Firefox long ago (basically as soon as chrome came out, and then, safari 4 - as a user who used it way back when it was called Phoenix) because it has no killer feature I actually need/want.

        Chrome has multiple threads. It makes a massive difference when browsing jav

      • Re:Good thing (Score:5, Interesting)

        by Trepidity ( 597 ) <delirium-slashdot@@@hackish...org> on Tuesday January 05, 2010 @04:01AM (#30652340)

        This is admittedly not an issue for a ton of people, but Chrome/Chromium is less architecture-portable as well, since instead of being all C/C++ or some other portable language like most browsers, its JavaScript engine [google.com] directly emits native code.

        It can currently do x86 and ARM, which covers almost everyone, but does mean that it can't run it on, for example, PPC macs, so I can't use it on my PowerBook, which is actually the machine that I'd most appreciate a faster browser on.

    • Re: (Score:3, Funny)

      by OverlordQ ( 264228 )

      Other browsers have already caught up to Firefox in speed, features, and standards support.

      They're lacking the 'Eat your Memory' feature.

    • by CAIMLAS ( 41445 )

      I don't know about that.

      Every once in a while I'll give other browsers a shot, just to see how everyone's doing.

      About the time that Firefox 3.5 came out, I gave the latest Opera a try (think it was 10). Its UI is decent, and it is fast. But it didn't perform as well as Firefox on a system with 512Mb, not by a long shot.

      I seem to be able to consistently crash IE8 on a Windows 7 virtual machine I've got. It's also painfully slow at loading pages, opening new tabs, responding to keyboard input, and the like -

  • Thread != Process (Score:5, Informative)

    by kiltyj ( 936758 ) <[moc.liamg] [ta] [jytlik]> on Tuesday January 05, 2010 @01:04AM (#30651390)

    Firefox, in its official version, still lacks support for multi-threading

    Firefox certainly supports multi-threading. A thread [wikipedia.org] is not the same thing as a process [wikipedia.org].

    • Re: (Score:3, Interesting)

      There is no reason FF couldn't use separate threads to handle the threading of separate tabs. As it is, if any tab locks up, then the whole set of tabs gets stuck. Whether you use a process to separate each tab or you simulate it with threads, the difference is merely architectural.

      The shared memory and object resources is the bottleneck with threads, but there is no reason why a single process couldn't render separate tabs completely separately.

      • Re:Thread != Process (Score:5, Interesting)

        by Magic5Ball ( 188725 ) on Tuesday January 05, 2010 @01:33AM (#30651576)

        Read bug 40848 for the list of technical issues. Amongst other things, document windows may display and communicate with each other, or refer to each other, which leads to race conditions, etc.

        (The process documented in 40848 also explains why this idea has taken 9.5 years and some skunkworks outside/despite the open development process to get this feature to this point.)

      • Re: (Score:3, Interesting)

        by Anpheus ( 908711 )

        Because it's hard to write renderers that catch all edge cases and harder still to sandbox a single thread of execution within a process. Just as the OS, to a degree, "owns" the process and can thus manipulate its environment, the process is the "owner" of its threads and is largely responsible for making sure they don't do anything improper.

        Since on every OS platform a lot of work has gone into security in the past ten years, why reinvent the wheel? (Although, apparently, Google has already done this with

    • If you're going to assert that Firefox does indeed support multi-threading, I think it'd be more informative if you could post evidence that Firefox is in fact threaded than the difference between a thread and a process. Or is the issue here that people are incorrectly using the term multithreading? If thats the case, I think you should make that point instead. Whatever your point is, its like saying Intel supports SLI. PCI Express is not the same as ISA.
      • If you never see more than 100% CPU in top, it probably doesn't, and I've never seen that, and it doesn't run multiple processes either.
        Chrome, however, runs several processes, even for plugins (often called "exe" because Chrome spawns /proc/$$/exe.)

    • by fm6 ( 162816 ) on Tuesday January 05, 2010 @01:48AM (#30651654) Homepage Journal

      The writer's mistake is more basic than just conflating threads and processes. You left out the parenthesis:

      still lacks support for multi-threading (running on different processors)

      Which not only conflates cores and processors, but also suggests that multithreading isn't useful if you don't have multiple cores/processors.

      When I was writing the concurrency chapter [sun.com] in the Java Tutorial, the experts would give me a very hard time if I allowed even a vague suggestion that this was true. The fact is, threads are extremely useful even if you only have one core to work with. For example, any well-written GUI program will not handle user interaction in the same thread with other functions; if it did, the GUI would freeze every time the program were waiting on something.

      Multithreading is a big topic these days because everybody wants to maximize their utilization of all these n-core processors. But it's not a new topic.

      This mistake seems to be very common [google.com]. Which leaves me confused as to what's new here. It's not parallel downloading of files — Mozilla/Firefox has always done that. A more robust parallelism mechanism? Or maybe they're copying Chrome and giving each tab its own process (not thread!).

  • by BadAnalogyGuy ( 945258 ) <BadAnalogyGuy@gmail.com> on Tuesday January 05, 2010 @01:04AM (#30651396)

    Multithreading still relies on a single point of failure - the shared memory space.

    By doing what Chrome did, and breaking each tab instance into its own process, any single tab can crash/hang without affecting any other page.

    I know when I load an MPG video that it sometimes hangs the browser, and I can't do anything (close/minimize/switch away) while the media player is being loaded. This sometimes causes me stress.

  • Summary is wrong! (Score:5, Insightful)

    by A12m0v ( 1315511 ) on Tuesday January 05, 2010 @01:05AM (#30651402) Journal

    Firefox does support multithreading, what it doesn't support is multiprocessing. Firefox runs as a single process, whereas Chrome has a separate process for every site, plugin and extension.

    • Currently if I start firefox twice the second request goes to the first process. With a simple tweak you could allow the second process to start and get a multiprocessing firefox with perhaps a one line change.

      I know thats not the point, but are we trying to go the long way around to our solution here? Sometimes it is best not to build an operating system into your application.

      • You'd still need some way of synchronizing access to the Firefox profile. Right now, you can't run Firefox twice using the same profile, which means you can't share settings, cookies, extensions, etc.
  • by NormAtHome ( 99305 ) on Tuesday January 05, 2010 @01:14AM (#30651464)

    Don't get me wrong, I love FireFox and it's my preferred browser but I do feel like it's falling behind in a lack of ability to take advantage of certain hardware and software advances.

    First as noted, FireFox does not really take advantage of multiple Cpu core's and there's no official 64 bit version. I've read that the developers opinion is that why have a 64 bit version if the most necessary plugin, flash is not available in a 64 bit version so why bother. But Sun does make a 64 bit JRE and that's half the battle and I honestly believe that if a 64 bit official version of FireFox were released that would spur Adobe to jump on the band wagon and produce a 64 bit Flash plugin.

    • Android uses chrome, the iPod uses Safari. Both browsers support small screens by letting the user drag the finger/pointer to pan. I am not aware of firefox doing this. It may be a trivial UI tweak but firefox won't work on a phone until it works.

      • Re: (Score:3, Informative)

        by Anonymous Coward

        Fennec [mozilla.org] is Firefox's version of a mobile browser, with finger/pointer panning.

    • Why would that spur Adobe to make a 64-bit version? As much as people hate it around here, it would take a 64-bit version of IE being the default to really spur them. I look at our website statistics and over 80% of our hits are from some type of MSIE. This causes much gnashing of teeth, but...

      • by A12m0v ( 1315511 )

        Why would that spur Adobe to make a 64-bit version? As much as people hate it around here, it would take a 64-bit version of IE being the default to really spur them. I look at our website statistics and over 80% of our hits are from some type of MSIE. This causes much gnashing of teeth, but...

        You've got the right idea here. I wonder if Gnash went 64bit before Flash, would that help its adoption?

      • Why would that spur Adobe to make a 64-bit version?

        Not really sure but you can ask them why after you download it from http://labs.adobe.com/technologies/flashplayer10/64bit.html [adobe.com]

    • Re: (Score:3, Informative)

      and there's no official 64 bit version. I've read that the developers opinion is that why have a 64 bit version if the most necessary plugin, flash is not available in a 64 bit version so why bother. But Sun does make a 64 bit JRE and that's half the battle

      Flash is used on just about every site out there. Java isn't. About the -only- issue I've had with Java not being installed was that I had to use the simple uploader to upload pictures on Facebook. I haven't had a Java plugin installed in 2-3 years and haven't experienced any loss due to it. However, the lack of Flash would make most sites unusable that the average person goes to A) YouTube B) Flash game sites C) Flash cartoon sites like Homestar Runner D) A -lot- of sites have Flash for navigation.

      I honestly believe that if a 64 bit official version of FireFox were released that would spur Adobe to jump on the band wagon and produce a 64 bit Flash plugin.

      Who

      • Re: (Score:3, Insightful)

        64-bit is great for everyone who owns cameras of any modern make and makes use of said cameras, especially consumer video and modern digital SLRs. Editing that stuff and manipulating it in batches takes a ton of RAM.
        You don't need to be a pro you just need to own a camera(s) and have a couple kids. Heck there's a jillion contributors to YouTube who would benefit from 64-bit and more ram. Most of them probably don't even know it.
        The right question to me is "Why are we still using 32-bit?"
        • by Gordo_1 ( 256312 )

          As I sit here happily running 32-bit firefox in Windows 7 64-bit, I'm having trouble understanding what photo editing has to do with the need for a 64-bit web browser.

          • How can you make use of 12+ gigs of ram with a 32bit OS? I had to use a 64bit OS just to take full advantage of my hardware.
            I wish my CPU were 128bit and I could expand my ram by the hundreds of gigs.

            • erm... 1. the linux PAE kernel supports up to 64GB of ram... and is 32 bit 2. 64bit cpus support up to a theoretical 16 billion gigabytes of ram, though right now most only implement around 48 bits for page addressing, which is still 65 TB of ram (I think, too lazy to grab a calculator). In other words, your 64bit cpu supports hundreds of gigs of ram, it's your motherboard that's a sissy.
          • Look at the post I was answering. The question was "who needs 64 bit?" Firefox really didn't have anything to do with it. My question regarding 32-bit still applies.
        • The right question to me is "Why are we still using 32-bit?

          It's sufficient *unless* one needs to access tons of RAM (e.g., for video/photo editing, huge database, ...), and it's faster than 64-bit. So, for +95% of computer uses, 32-bit is fine.

          • +95% of computer uses, 32-bit is fine.

            Maybe, at least for office use.
            But almost everybody I know with a "home computer" complains about the time it takes to play with the videos and photos coming out of their ears.
            It's only going to get exponentially more significant.
        • Re: (Score:3, Funny)

          by Barny ( 103770 )

          Yup, I managed to convince my manager that with the rollout of windows 7 to all our new PCs (we sell PCs) that 64bit should be the norm.

          So we can now boast "computers with 4GB of ram" and point out to the customer that our machines (and none of our competitors nearby) can use all of it AND the nice big 1GB vid card they just plonked into it :)

          Of course there's a few problems, one person just asked me why his program he has been using since windows 3.1 doesn't work...

          • Of course there's a few problems, one person just asked me why his program he has been using since windows 3.1 doesn't work...

            Well, why doesn't it? Do you mean Win7 64bit can't run 32bit programs? Why the fuck not?

            • by pjt33 ( 739471 )

              Win 3.1 couldn't. 16-bit. Maybe MS thought that by 2009 people had had enough time to port their old 16-bit programs?

          • one person just asked me why his program he has been using since windows 3.1 doesn't work...

            Which is a perfectly valid question from a user, and should have been considered when upgrading..

    • by Korbeau ( 913903 )

      First as noted, FireFox does not really take advantage of multiple Cpu core's and there's no official 64 bit version.

      Ahh nostalgia ... who would have thought back then that in 2010 a web browser would ever have the need to take advantage of multiple cores!

    • by Hurricane78 ( 562437 ) <deleted&slashdot,org> on Tuesday January 05, 2010 @02:27AM (#30651840)

      Uuum, sorry? I use 64 bit Flash on Linux right now. Yes, from Adobe.
      They still call it alpha, but apart from it sometimes hanging the browser for a minute at start, but then working... and a bit of memory leaking... it is no different from the r32 bin Windows release version.
      Also, video playback is much faster with it.

      Also, no 64 plug-in is a lousy excuse. As we use Flash on 64 bit systems trough multilib/“emulation” since forever.
      Oh, and since my Firefox is self-compiled, I’m pretty sure it also is 64 bit. :)

      • They still call it alpha, but apart from it sometimes hanging the browser for a minute at start, but then working... and a bit of memory leaking... it is no different from the r32 bin Windows release version.

        So, you mean it works exactly like the Windows release version? ;-)

    • by vipw ( 228 )

      Of course it takes advantage of multiple cpu cores. Just look how many threads it's running.

    • There is an early 64-bit version of Adobe's flash plugin: http://labs.adobe.com/technologies/flashplayer10/64bit.html [adobe.com] (Linux only)

  • by parallel_prankster ( 1455313 ) on Tuesday January 05, 2010 @01:23AM (#30651518)
    On so many levels !! first of all - The title of the Electrolysis page clearly mentions using multiple processes - where the heck did anyone mention multi-threading? Secondly - multi-threading is not the same as running on different processors. You can potentially split a program into user level threads just to simplify code. Third - firefox already supports multi-threading. The only problem is that threads are still connected to the same PID and killing that in windows/linux/mac will kill all threads along with it. The original article states they are starting from a chromium base. That may be the reason for speedup in Java scripts test ?
    • That may be the reason for speedup in Java scripts test?

      Sorry, in this case it really is “JavaScript (scripts) test“.
      Java is something completely different than JavaScript. As much as C++ and Python are different, but the first one was partially inspired the second one. Java was originally called Oak. And JavaScript can be called ECMAScript. Maybe that makes it easier to keep them apart. :)

    • You can potentially split a program into user level threads just to simplify code.

      Ermm... maybe I just don't have sufficient experience writing real-world code, but when do threads ever simplify anything?

      I mean, you have to worry about race conditions and deadlocks all of the sudden, which means you have to pretty much lock everything, and in some consistent order.

      Plus, if you have some nice abstraction (say, a shared hash map) which does all its own locking the right way, making every operation (insert, delete, retrieve, etc.) a transaction, you need to break the abstraction and poke at

  • ummm... (Score:4, Insightful)

    by buddyglass ( 925859 ) on Tuesday January 05, 2010 @01:32AM (#30651570)

    Process-per-tab shouldn't speed up Javascript unless you're doing something else in a second tab that's hogging CPU. Most likely the Javascript performance gains came simply from the fact that he was using a 3.7 branch of the code. Which is kind of sad, considering bleeding-edge Firefox still lags behind Chrome by a considerable margin.

    • Re:ummm... (Score:5, Informative)

      by BZ ( 40346 ) on Tuesday January 05, 2010 @01:47AM (#30651644)

      Lags behind Chrome on a particular benchmark (Sunspider). Ignoring for the moment the Sunspider tests that are purposefully slower in SpiderMonkey than in other JS engines (by using extension features that only SpiderMonkey implements and that slow the test down if implemented), that leaves the question of how relevant Sunspider is.

      In my testing, Chrome is anywhere from 4x faster to 4x slower than Firefox on various JavaScript/DOM/canvas tasks. It really depends on the task, as expected: if nothing else different jit heuristics will lead to better or worse performance on the same code even if all else is identical.

    • Re: (Score:3, Informative)

      by BZ ( 40346 )

      But yes, you're right that the multi-process parts of electrolysis (which this guy didn't enable and hence wasn't testing) have nothing to do with JS performance.

  • still lacks support for multi-threading (running on different processors)

    Multi-threading is running multiple threads of execution on a single cpu, which has been done on single-cpu processors for decades. That's not multiprocessing [wikipedia.org].

    I thought this was a tech site.

    What next - an article about how someone just bought a new hard disk to upgrade their ram, because it was cheaper than chips and a lot bigger?

    • Re: (Score:3, Insightful)

      by Corson ( 746347 )
      I think multithreading means launching multiple execution threads and it's up to the scheduler to assign each thread to a logical CPU, based on load. If you write and run a program that spawns two threads on a dual-core machine, with no other CPU-intensive software running, then you will notice that each thread is executed on a distinct CPU (core).
  • I just checked in Task Manager and Firefox has 27 threads open. You were saying?

Two can Live as Cheaply as One for Half as Long. -- Howard Kandel

Working...