Stories
Slash Boxes
Comments

SoylentNews is people

posted by janrinok on Saturday March 15 2014, @10:07PM   Printer-friendly
from the we-always-need-new-languages dept.

An anonymous coward writes:

"Mozilla is using work on it's next generation layout engine, Servo, to fine tune a new language used for writing that layout engine. The new language, called Rust, started as a personal project of Greydon Hoare and has since grown to be sponsored by Mozilla and Samsung. From the article:

The Rust language will power Mozilla's new browser, Servo, and its big selling point is efficiency. Because C++ crashes when it runs into memory allocation issues, it weakens any browser that uses the language. Mozilla designed Rust to be superior to C++ this way, more easily isolating tasks and promote a process known as "work stealing," which is when tasks from an overloaded processor are shifted over to another one.

Rust is a general purpose, multi-paradigm, compiled programming language developed by Mozilla Research. It is designed to be a "safe, concurrent, practical language", supporting pure-functional, concurrent-actor, imperative-procedural, and object-oriented styles."

 
This discussion has been archived. No new comments can be posted.
Display Options Threshold/Breakthrough Mark All as Read Mark All as Unread
The Fine Print: The following comments are owned by whoever posted them. We are not responsible for them in any way.
  • (Score: 1) by Angry Jesus on Saturday March 15 2014, @11:21PM

    by Angry Jesus (182) on Saturday March 15 2014, @11:21PM (#16991)

    > the memory problems in Firefox, like not freeing memory from closed tabs, and memory leaks

    Are these really problems anymore? I haven't run into mozilla (versus plugin) memory leaks for years.

    I think the summary has vastly over-simplified the goals for rust.

    Starting Score:    1  point
    Moderation   -1  
       Overrated=1, Total=1
    Karma-Bonus Modifier   +1  

    Total Score:   1  
  • (Score: 4, Interesting) by Reziac on Sunday March 16 2014, @03:14AM

    by Reziac (2489) on Sunday March 16 2014, @03:14AM (#17051) Homepage

    I don't know if it qualifies technically as a leak, but Mozilla's cache management is, in my observation, the direct cause of its galloping memory usage. There's no excuse for taking half a gig to display 30k of text... and never giving it back. :(

    --
    And there is no Alkibiades to come back and save us from ourselves.
    • (Score: 2) by Angry Jesus on Monday March 17 2014, @03:09AM

      by Angry Jesus (182) on Monday March 17 2014, @03:09AM (#17359)

      > There's no excuse for taking half a gig to display 30k of text... and never giving it back.

      But ridiculous hyperbole, that's totally excusable!

      • (Score: 2) by Reziac on Monday March 17 2014, @03:49AM

        by Reziac (2489) on Monday March 17 2014, @03:49AM (#17373) Homepage

        Sorry, I meant 213MB to display this page. [slaps self] Or 213,580k. There, fixed!

        --
        And there is no Alkibiades to come back and save us from ourselves.
        • (Score: 1) by Angry Jesus on Monday March 17 2014, @10:57AM

          by Angry Jesus (182) on Monday March 17 2014, @10:57AM (#17505)

          That is more realistic. However, what I am seeing on linux is a fresh start is 136MB resident and 138MB resident after loading this story's discussion page at -1 and flat. So 2MB consumed for displaying the page.

          The about:memory says 46MB of that is misc heap, 50MB is javascript runtime and 30MB is javascript heap. You might say 80MB for javascript's starting point is out there, but it seems reasonable to me given the emphasis on making javascript fast as possible.

          • (Score: 2) by Reziac on Monday March 17 2014, @01:47PM

            by Reziac (2489) on Monday March 17 2014, @01:47PM (#17578) Homepage

            I have javascript turned off. And 213 mb was just that one page open. A 3k page of nothing but text.

            For comparison, to display the SAME page with the SAME settings (no JS, no CSS, no images), Netscape 3 uses 7mb TOTAL. And NS3 is orders of magnitude faster, as becomes evident with larger or more complex HTML. So it's not like it can't be done.

            My observation is that Mozilla evidently uses a lot of bad coding Zen (per Michael Abrash's concept); the disaster that's its cache management as case in point. Funny how with no caching (which I would do if I had anything like a reliably fast connection) or when there's hardly anything in it, the galloping memory usage doesn't happen.

            Right now SM is using 280mb, having peaked sometime overnight at 349mb... while doing nothing but keeping one moderately 'complex' page open (forecase from NOAA.gov).

            I've seen it peak at over 1.5GB, tho, after a few days of being up and moderate use -- and once it starts growing like that, it never gives back much of it.

            --
            And there is no Alkibiades to come back and save us from ourselves.
            • (Score: 1) by Angry Jesus on Monday March 17 2014, @03:10PM

              by Angry Jesus (182) on Monday March 17 2014, @03:10PM (#17633)

              > I have javascript turned off

              What does "about:memory" tell you?

              > And NS3 is orders of magnitude faster, as becomes evident with larger or more complex HTML.

              It is indeed super fast, easy to do so when it doesn't even support as complex as CSS1.

              • (Score: 2) by Reziac on Monday March 17 2014, @03:30PM

                by Reziac (2489) on Monday March 17 2014, @03:30PM (#17655) Homepage

                The NS3 engine itself was vastly faster -- which was obvious once NS4 came out and did the same jobs (initially it did very little more than NS3 did) at about 1/10th the speed, even with JS and images off. But the NS3 source code has been lost (I once spoke to one of the major coders about it; he said he'd tried and tried to get it released once opensource became a thing, but it wasn't happening) and evidently no one since has been competent to recreate that efficiency. :(

                Right now SM claims to display this page takes 159mb... a few bits:

                68.23 MB (43.17%) -- heap-unclassified
                45.93 MB (29.06%) -- js

                and

                Other Measurements
                    0.19 MB -- canvas-2d-pixel-bytes
                    0.00 MB -- gfx-d2d-surfacecache
                    0.00 MB -- gfx-d2d-surfacevram
                    0.00 MB -- gfx-surface-image
                  14.34 MB -- gfx-surface-win32
                141.49 MB -- heap-allocated
                175.67 MB -- heap-committed
                    2.78 MB -- heap-dirty
                102.50 MB -- heap-unallocated
                                6 -- js-compartments-system
                              28 -- js-compartments-user
                  27.00 MB -- js-gc-heap
                    3.47 MB -- js-gc-heap-arena-unused
                    0.00 MB -- js-gc-heap-chunk-clean-unused
                  12.40 MB -- js-gc-heap-chunk-dirty-unused
                      58.74% -- js-gc-heap-unused-fraction
                206.43 MB -- private
                225.40 MB -- resident
                    4.44 MB -- shmem-allocated
                    4.44 MB -- shmem-mapped
                419.75 MB -- vsize

                This is just nuts. What on earth does it have to do that takes all this to display a page that even Mosaic 0.9 doesn't struggle with??

                This is why I've said for years that developers should be constrained to working on the dead minimum hardware that will run their software, so they can experience it how average folks will. We should not be forced to buy new hardware just because the basic coding philosophy now seems to be "Junk fills the space allotted".

                --
                And there is no Alkibiades to come back and save us from ourselves.
                • (Score: 0) by Angry Jesus on Monday March 17 2014, @04:11PM

                  by Angry Jesus (182) on Monday March 17 2014, @04:11PM (#17679)

                  > The NS3 engine itself was vastly faster -- which was obvious once NS4 came out

                  Everyone knows NS4 was a clusterfuck, which means comparing NS3 to NS4 as a means to say thing about modern firefox is cherry-picking.

                  Still, you are missing the point - modern firefox implements orders of magnitude more functionality than NS3. Any comparison of speeds on "complex html" is to beg the question because NS3 can't do complex html. The price for additional functionality is additional memory and cpu.

                  > 102.50 MB -- heap-unallocated

                  I don't even see heap-unallocated in 27.0.1, are you running an old version of firefox?

                  > "less verbose" to "more verbose" consistently uses about 9mb. To display about 30 more lines of text. :(

                  I get 2MB difference and when I cut-n-paste the text on the page into wc, regular has 248 lines, verbose has 4,371 lines.

                  • (Score: 2) by Reziac on Monday March 17 2014, @04:45PM

                    by Reziac (2489) on Monday March 17 2014, @04:45PM (#17688) Homepage

                    SeaMonkey v2.5 at the moment. I tend not to upgrade unless I have to, because the next version is invariably worse in some way either annoying or critical. :( I don't use Firefox at all, because it makes me want to kill the developers. (If forced by some cranky site, I'll use PaleMoon, but not for everyday.)

                    And verbose wasn't much more in my case, but I had very little going on at that instant.

                    See, there's the point I was making -- NS4 was indeed a clusterfuck, yet in its early stages it did very little more than NS3. Just did it massively slower. Sometimes a total code rewrite is NOT a good thing.

                    Incidentally, Abrash's old book is now available online (it's been a freebie for years, I think I got it with his Black Book):
                    http://www.jagregory.com/abrash-zen-of-asm/ [jagregory.com]

                    --
                    And there is no Alkibiades to come back and save us from ourselves.
                    • (Score: 0) by Angry Jesus on Monday March 17 2014, @05:07PM

                      by Angry Jesus (182) on Monday March 17 2014, @05:07PM (#17701)

                      See, there's the point I was making -- NS4 was indeed a clusterfuck, yet in its early stages it did very little more than NS3. Just did it massively slower. Sometimes a total code rewrite is NOT a good thing.

                      That's odd, I thought your point was that firefox is a pointless memory hog and when required to drill down to the actual reasoning and evidence behind that point, it turned out to be technical innuendo.

                      • (Score: 2) by Reziac on Monday March 17 2014, @05:21PM

                        by Reziac (2489) on Monday March 17 2014, @05:21PM (#17706) Homepage

                        Dunno how you concluded that, but whatever.

                        Read Abrash's Black Book, it'll give you some insights.

                        --
                        And there is no Alkibiades to come back and save us from ourselves.
              • (Score: 2) by Reziac on Monday March 17 2014, @03:34PM

                by Reziac (2489) on Monday March 17 2014, @03:34PM (#17657) Homepage

                Addendum: with no pages open but the "about:memory" page, going from "less verbose" to "more verbose" consistently uses about 9mb. To display about 30 more lines of text. :(

                --
                And there is no Alkibiades to come back and save us from ourselves.
    • (Score: 2) by Reziac on Monday March 17 2014, @03:44AM

      by Reziac (2489) on Monday March 17 2014, @03:44AM (#17370) Homepage

      Only a slight exaggeration... right now it's using 213k to display nothing but THIS page.

      --
      And there is no Alkibiades to come back and save us from ourselves.