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

 



Forgot your password?
typodupeerror
×
Firefox Mozilla Programming News

Firefox Javascript Engine Becomes Single Threaded 346

An anonymous reader writes with news about work on Mozilla's Javascript engine. Quoting Mozilla engineer Luke Wagner's blog: "With web workers in separate runtimes, there were no significant multi-threaded runtime uses remaining. Furthermore, to achieve single-threaded compartments, the platform features that allowed JS to easily ship a closure off to another thread had been removed since closures fundamentally carry with them a reference to their original enclosing scope. Even non-Mozilla SpiderMonkey embeddings had reportedly experienced problems that pushed them toward a similar shared-nothing design. Thus, there was little reason to maintain the non-trivial complexity caused by multi-threading support. There are a lot of things that 'would be nice' but what pushed us over the edge is that a single-threaded runtime allows us to hoist a lot data currently stored per-compartment into the runtime. This provides immediate memory savings."
This discussion has been archived. No new comments can be posted.

Firefox Javascript Engine Becomes Single Threaded

Comments Filter:
  • by ShakaUVM ( 157947 ) on Wednesday January 25, 2012 @02:21PM (#38820401) Homepage Journal

    "us to hoist a lot data currently stored"

    I really wish I knew what this phrase meant. It sounds fascinating.

    But seriously, if there's no performance gain from multithreading, it can be a really good idea to move away from the complexity of it. There's a lot of traps people can fall into with concurrent code if they don't know what they're doing.

  • Re:You had me at.. (Score:1, Insightful)

    by Lumpy ( 12016 ) on Wednesday January 25, 2012 @03:01PM (#38820913) Homepage

    Then why does it suck horribly compared to Chrome?

    Honestly, Chrome is 3X faster than Firefox. Plus I dont get chrome locking up right after I click on a download like Firefox does for 12-20 seconds.

  • Re:You had me at.. (Score:2, Insightful)

    by owlnation ( 858981 ) on Wednesday January 25, 2012 @03:47PM (#38821455)

    So...can we put this cliche to bed now?

    No. Let's not.

    Simply because Firefox devs are some of the most complacent, or downright willfully arrogant folks out there. It took years, literally years, for them to even admit there were massive memory leaks in Firefox. Anyone who suggested it here was branded a troll by them -- but that was back in the day when people liked, believed, and trusted in Firefox, back in the days when it was on its ascendancy. Those days are well and truly over.

    So while they may have fixed most of the memory leaks (it still runs like shit on a Mac), let us not allow them to get complacent again. They are already vain and arrogant about their lunatic version number race, so let's not go back to the days of them being in complete denial about other problems too. By not frequently reminding them about memory leaks, you are opening the door to yet more bloat going forward.

    It's important they understand we have not forgotten how many years it took them to deal with the memory leaks they pretended did not even exist.

  • Re:You had me at.. (Score:5, Insightful)

    by MightyYar ( 622222 ) on Wednesday January 25, 2012 @03:49PM (#38821481)

    Me to friend: Use Firefox! It has these awesome extensions! Definitely install AdBlock Plus, NoScript, Tree-Style Tabs, Auto Pager, IE Tab2, GreaseMonkey, Firebug, and the Developer Toolbar!

    Friend: Does your Firefox use every bit of your system's memory?

    Me: Pffft, well, only if I use the extensions!

    In all seriousness, they need to do something about the extensions. Refuse to host leaky ones or something. Extensions can't be Firefox's killer feature if they make it eat all of your RAM.

  • Re:You had me at.. (Score:4, Insightful)

    by UnknownSoldier ( 67820 ) on Wednesday January 25, 2012 @04:40PM (#38822041)

    > We live in a world where 8GB of RAM costs $50.

    Ah sweet, so you're offering to pay for upgrading/replacing netbooks and embedded devices with more RAM !

    Stop being a myopic PC developer with RAM means nothing -- there are other platforms where we actually care about RAM usage.

  • by jlebar ( 1904578 ) on Wednesday January 25, 2012 @04:42PM (#38822063) Homepage

    So while they may have fixed most of the memory leaks (it still runs like shit on a Mac), let us not allow them to get complacent again. [snip] By not frequently reminding them about memory leaks, you are opening the door to yet more bloat going forward.

    I believe there's a parallel with a common fable:

    You saw a wolf. I said I shot many, that the wolf situation should be improved, but you kept seeing wolves. This repeated many times and made you angry.

    Now lots of others are saying that there really are fewer wolves these days. Indeed, you have no reason to believe that they're wrong.

    But because of the offense done to you some time ago, you're going to continue crying wolf, even given no evidence at all?

    I don't understand. I guess this is an attempt to punish us? Is it that you feel like we harmed you with our lies, so you should try to harm us with yours? I'm afraid that by crying wolf, and encouraging others to do the same, may just cause us to ignore you all, which is exactly the outcome you don't want.

    I'm very sorry you feel like Mozilla deceived and harmed you. But the malicious attitude here and elsewhere in this thread is getting old. Use Chrome, if you like! But don't encourage people to waste developers' time with false claims.

  • Re:You had me at.. (Score:4, Insightful)

    by MightyYar ( 622222 ) on Wednesday January 25, 2012 @04:45PM (#38822091)

    That is awesome - thanks. And I just read your team's memory presentation by Nicholas Nethercote [mozilla.org] :)

  • Re:You had me at.. (Score:4, Insightful)

    by eexaa ( 1252378 ) on Wednesday January 25, 2012 @04:57PM (#38822231) Homepage

    "Chrome is 3X faster"

    Dear sir, how did you obtain such an accurate measurement?

Software production is assumed to be a line function, but it is run like a staff function. -- Paul Licker

Working...