5 ms·
“The colored boxes indicate which CPU core performed layout for each node”
- pcwalton 12y agoIf you're curious why clustering of nearby nodes happens, it's a side effect of the work-stealing [1] strategy that Servo layout uses. This is actually beneficial for the cache, because adjacent layout objects tend to be located together in memory. [1]: http://en.wikipedia.org/wiki/Work_stealing http://en.wikipedia.org/wiki/Work_stealing
- BasDirks 12y agoProps for using the word "askew".
- kibwen 12y agoHere's a PR showing off a different visualization, that of parallel painting of tiles: https://github.com/servo/servo/pull/4969 https://github.com/servo/servo/pull/4969
- simcop2387 12y agoAll of this work is really making Servo look more and more like it's going to be the future of browsers. I'm amazed that they're able to get the layout as parallelized as they are, and with the painting being like that I think it's got a great shot at being one of the more performant browsers on mobile.
- jobposter1234 12y agoWhat is Servo?
- pcwalton 12y agoWikipedia's explanation is pretty good: http://en.wikipedia.org/wiki/Servo_%28layout_engine%29 http://en.wikipedia.org/wiki/Servo_%28layout_engine%29
- deleted 12y ago[deleted]
- soapdog 12y agoNew browser engine from Mozilla. One of its prime objectives is to build an engine that can leverage the multiples cores we have to day and work stuff in parallel. It still not ready for prime use but its growing really well. IIRC its built with Rust and maybe some unsafe C/C++ code (unsafe in terms of Rust) for things such as the JS engine. More info about Rust at http://www.rust-lang.org/ http://www.rust-lang.org/ More info about Servo at https://github.com/servo/servo#the-servo-parallel-browser-project https://github.com/servo/servo#the-servo-parallel-browser-pr...
- ElectricFeel 12y agospeaking from a similar perspective here, I'm jealous of your long list of contributors
- kibwen 12y agoPiggybacking off of this, if anyone would like to try their hand at contributing to Servo I recommend checking out the "E-Easy" bugs on the issue tracker ( https://github.com/servo/servo/labels/E-easy https://github.com/servo/servo/labels/E-easy ) and hitting up #servo on irc.mozilla.org ( http://chat.mibbit.com/?server=irc.mozilla.org&channel=%23servo http://chat.mibbit.com/?server=irc.mozilla.org&channel=%23se... ). It's not often that you get to be a part of rewriting a browser engine from scratch. :) And you don't need to be a Rust expert to contribute (not least because essentially nobody in the world fits that description)! It's totally common for initial commits to be the first serious lines of Rust a contributor has ever written ( https://twitter.com/chimeracoder/status/583755185899626496 https://twitter.com/chimeracoder/status/583755185899626496 ).
- sanxiyn 12y agoI think this is a great advantage of Rust. Even with code review, you won't want to contribute your first C++ code to WebKit. But it's totally possible to contribute your first Rust code to Servo (I witnessed this multiple times), and damage you can cause is quite limited.
- gsnedders 12y agoWebKit actually has quite a lot of fairly nice, simple easy-to-read C++, especially around the DOM. Or at least did a few years ago, and I believe it's still mostly the case. I remember asking for advice years ago where to cut my teeth on C++ and getting suggested WebKit by several — and people who weren't trying to lead me massively into a pit of doom. (Admittedly, I've still practically never contributed to WebKit, and I ended up doing my first larger bits of C++ on Presto. But hey, I've still read plenty of WebKit code over the years.)
- supahfly_remix 12y agoAre multiple cores being used to draw a webpage? If so, do typical webpages need this level of performance for a satisfactory user experience?
- simcop2387 12y agoYes multiple cores are being used. It's not that typical webpages need this level of performance, but by doing this you can actually save battery life and power usage on things like mobile devices and laptops. Since you can render the page 2-3x faster (numbers pulled out of donkey) you can use a burst of more cores at a lower speed to accomplish the same thing.
- higherpurpose 12y ago> Since you can render the page 2-3x faster (numbers pulled out of donkey) 2-3x faster seems about right for 4 cores: http://www.phoronix.com/scan.php?page=news_item&px=MTgzNDA http://www.phoronix.com/scan.php?page=news_item&px=MTgzNDA I think that was on 4 ARM cores/threads, so the increase in performance may be even bigger for 4 cores/8 thread chips. From the PDF link it also seems that if the 4 cores work "at the same performance" level as 1 core, power consumption can drop down to 40% (page 23). https://events.linuxfoundation.org/sites/events/files/slides/LinuxConEU2014.pdf https://events.linuxfoundation.org/sites/events/files/slides...
- simcop2387 12y agoPerfect. I thought that's what I remembered reading but couldn't even come close to finding it when I wrote that. That's the kind of research they've been intending to do with it for a while now and it's honestly huge enough that I won't be too surprised if Servo starts replacing Gecko on Firefox OS and the Firefox Mobile browsers. All it's going to take is to really get it working on 90% of websites and then I think it'll be a clear contender for replacing Gecko in a lot of places. I'd love to also see a JS engine in Rust but I know with a JIT and all you end up with none of the safety you get from Rust anyway. With the browser chrome being done in HTML with the mozbrowser extensions it looks like it might be possible to start doing a lot of the same things that XUL does in firefox which opens the door to a lot of stuff being ported to the new browser.
- EugeneOZ 12y ago'Servo has another browser chrome!" I like these competition jokes :)
- hencq 12y agoActually chrome always referred to the non-content parts of the UI. Or at least it already did back in the Mozilla Seamonkey days. Chrome the browser was named as such because it removed a lot of the chrome and focused mostly on the content.
- EugeneOZ 12y agoIt's obvious, but I still think it's not just boring word in this case.
- Manishearth 12y agoHeh. That wasn't intentionally a joke (I wrote that bit), but I can see how it sounds like one. "chrome" is a term for the stuff that's part of a browser but not the browser engine (the rest of the UI). I did realize that that term could be misinterpreted (damn you Google) and thoought of alternative ways of putting it, but I couldn't come up with anything. "GUI" and "shell" both sounded wrong. When I said "another" I was referring to MiniServo[1][2] and the CEF port. [1]: https://github.com/pcwalton/miniservo-mac https://github.com/pcwalton/miniservo-mac [2]: https://github.com/metajack/miniservo-gtk https://github.com/metajack/miniservo-gtk
- EugeneOZ 12y agoI don't think it's a thing you should replace. Remember these stories about Netscape and MS? Funny time :) I'm sure people from both sides feel nothing except smiles in their souls, remembering these "wars".
- guelo 12y agoIf layout is going to be so parallelized does that mean we're going to need better asynchronous DOM APIs and possibly better Javascript threading support?
- steveklabnik 12y agoEnsuring that those APIs will exist and that other APIs don't block parallel layout is one of the goals of Servo, as a project. It's already informed several emerging standards.
- panzi 12y ago> It's already informed several emerging standards. Sounds interesting. Do you have more information on that? Any links?
- steveklabnik 12y agoI don't remember the specifics, but pcwalton should be able to tell you more.
- throwaway41597 12y agoFrom a previous story: getting element width/height https://news.ycombinator.com/item?id=9011767 https://news.ycombinator.com/item?id=9011767
- sunflowerdeath 12y agoAnd what about performance? Not compared to popular browsers, but compared to performance with single core mode.
- sanxiyn 12y agoApproximately 2x for 4 threads. See https://news.ycombinator.com/item?id=9313929 https://news.ycombinator.com/item?id=9313929.
- bastomi29 12y agohttps://gunungbromosunrisetour.wordpress.com/2015/01/08/dari-surabaya-ke-gunung-bromo/ https://gunungbromosunrisetour.wordpress.com/2015/01/08/dari...
- zobzu 12y agoNow thats a big font ;)
- digi_owl 12y agoAdded the servo blog to my rss reader, waiting for the article that announce a compiled release.
- Manishearth 12y agoThanks for following it! There's probably still time for this. We could create a nightly distribution of Servo in a day or so; but at the moment I don't think we see a need of this, especially given that there are still a couple of things (like everything needed for jQuery support) which we should get working first so that sites actually work in Servo. Perhaps this quarter we'll get all these features done. (FWIW we have a nightly android apk distribution, but at the moment it's broken due to openssl strangeness)
- digi_owl 12y agoAdded the servo blog to my rss reader, waiting for the article that announce a compiled release.