HN Theater @HNTheaterMonth

The best talks and videos of Hacker News.

Hacker News Comments on
Chrome vs Firefox vs Safari vs Servo WebRender

Jake Archibald · Youtube · 25 HN points · 9 HN comments
HN Theater has aggregated all Hacker News stories and comments that mention Jake Archibald's video "Chrome vs Firefox vs Safari vs Servo WebRender".
Youtube Summary
Here's this demo http://output.jsbin.com/surane/quiet, running across the nightlies of various browsers, all v-synced on a 60hz display.

Recording was made on a 2012 Macbook Pro, and the machine was screen capturing at the time.

The animation is done with JavaScript despite it being possible in pure CSS, because Servo doesn't support CSS transitions properly. A mixture of compositing & painting CSS properties are changed, no layout properties are changed.

It's really early days for Servo, and there are a lot of features it doesn't support, and it crashes a lot, and the output it a bit aliased… but the benefits of batching are clear, and other browsers should take note.
HN Theater Rankings

Hacker News Stories and Comments

All the comments and stories posted to Hacker News that reference this video.
Servo is nowhere near ready. It's been a few months since I've seen actual results, but I'd be surprised, if it nowadays completed ACID3 (which was state of the art for browsers in 2009).

The thing is that rewriting a browser engine doesn't just happen over night. No bigger browser engine has been written from scratch since the previous millennium. Also, no browser engine implements all currently specified webstandards. So, Mozilla would have to full-pelt develop Gecko to be able to keep up with Blink in webstandards, and then also develop Servo at more than full-pelt to be able to catch up in finite time.

That just doesn't add up, which is why Servo was specifically started as a research project. It might never be completed. They have been able to integrate various components from Servo directly into Gecko, therefore sharing the development work which they didn't really plan with, so that's one tiny reason to still hope for it to ever catch up, but yeah, just don't be too optimistic.

Having said all that, the integration of components from Servo into Gecko isn't done yet. WebRender is still missing, which should bring another good performance boost. It's sort of been overhyped with artificially complicated CSS animations [0], so the real world effect isn't that big, but it's still very much noticeable.

[0]: https://www.youtube.com/watch?v=u0hYIRQRiws

Aside from that, on Android, Mozilla is building a new framework for building Android browsers in general, called "android-components", which also includes a much cleaner integration of Gecko on Android, called "GeckoView". They've already rebased Firefox Focus onto GeckoView and are actively working on rebasing Firefox for Android (Fennec) onto it, too, which is internally called "Fenix". This should also significantly reduce the lagginess and speed up their development in the long-run.

I guess, what I'm mainly trying to say is that there's definitely still things happening.

dman
Maybe we need simpler standards? Ones that are implementable without spending a billion dollars.
dreamdu5t
We have them. HTML/HTTP work great, but the DOM and JS APIs are out of control, and their surface area has no end in sight.

The web actually works great without JS, and doesn’t require gigs of memory to browse.

Every month there’s some new JS API being proposed or developed for browsers, with no care for its impact on the web. The JS APIs are still growing and only getting more complicated too! service workers is a perfect example of the problem. Offline browsing worked great 20 fucking years ago, but now multithreaded Turing complete programming languages have to be used to view a website offline. It’s absolutely absurd.

richjdsmith
I'm sure the firefox team would agree with you wholeheartedly.

Chrome is the new IE though. Making whatever specs they need for Google Sites - standards be damned.

Well, as it says in the article, Firefox and Chrome on iOS are both just WebKit wrappers, because Apple doesn't allow other browser engines into their store, so I don't know what kind of black magic or bias or whatnot your users are experiencing.

As for Android, the new CSS engine (called "Quantum CSS" or "Stylo"), which landed with Firefox 57 on the desktop, should ship on Android with Firefox 59.

There's also "Quantum Render" or "WebRender" upcoming somewhen soonish. I'm guessing Firefox 60 or 61 on the desktop, so maybe again with a small delay then on Android, I don't know.

WebRender should be kind of a big deal. In extreme cases, the difference can look like this: https://www.youtube.com/watch?v=u0hYIRQRiws

I have it enabled on one of my Firefox profiles. Would not yet recommend for normal browsing, there's still rendering errors and sometimes seemingly random performance drops, but you can definitely see it working.

That is, I have to be lucky for this benchmark [1] to not crash my "regular" Firefox Nightly. With WebRender on the other hand, the benchmark becomes entirely unimpressive, as if you were just playing a pre-rendered video.

My system has an Intel i5-3220M with HD Graphics 4000 (was midrange for a laptop in 2012) and 4GiB RAM. OS is openSUSE Tumbleweed with a KDE Plasma + bspwm combination as desktop environment, so no desktop compositor (no idea if that makes a difference).

[1] https://www.youtube.com/watch?v=u0hYIRQRiws

The CSS engine was completely rewritten in Rust and now heavily utilizes parallelism, which Rust certainly did help with. I'd say, this was only about 1/4 of the performance increase going from 56 to 57, though. (Based on my perception, having run Nightly as daily driver and being aware of when which bigger change got merged.)

The rest of the performance work was untied from Rust, as far as I'm aware.

Upcoming somewhen after 57 is also WebRender / Quantum Render, which should give a significant boost to FPS. Basically, if you've ever wondered why your gaming PC can render out giant space warfares at 120 FPS, but your browser starts stuttering when that super cool menu animates itself, WebRender is going to fix that in principle.

So, there's still going to be other problems, like JavaScript performance just not being on par with compiled code, but it should bring us a lot closer to the FPS that you'd expect.

(To throw in some technical terms, in case you want to research: Browsers so far used Immediate Mode to draw things, whereas WebRender and video games use Retained Mode.)

And WebRender was architectured as part of Servo, so is also written in Rust, but I can't tell you, if Rust really benefitted work here, or if it just happens to be written in Rust.

This illustrates the sort of difference we're looking at with WebRender: https://www.youtube.com/watch?v=u0hYIRQRiws

(Mind, though, that the video is more than a year old now. Firefox 57 should also already perform a lot better than what is shown in the video. Then again, WebRender is VSync-capped in the video...)

> "Which is unlikely to happen anytime soon."

Mozilla are moving Servo's WebRender over to Firefox. The feature is called Quantum Render, you can read up about it here:

https://wiki.mozilla.org/Platform/GFX/Quantum_Render

To give some idea of what this means for CSS animation performance:

https://m.youtube.com/watch?v=u0hYIRQRiws

>"overall browser tech have languished"

Au contraire...

https://m.youtube.com/watch?v=u0hYIRQRiws

https://wiki.mozilla.org/Quantum

See this demo comparing Chrome, Firefox and Servo WebRender: https://www.youtube.com/watch?v=u0hYIRQRiws Servo WebRender uses the GPU making it much faster than classic renderers (besides CPU parallelism), think of it like a Webbrowser using Video Gaming technology.

There's a talk about this at https://air.mozilla.org/bay-area-rust-meetup-february-2016/ (HN discussion: https://news.ycombinator.com/item?id=11175258)

browser.html is just the current "skin" for Servo.

tehbeard
Any tests done on integrated graphics such as those in normal laptops?
Manishearth
It works awesomely on both integrated and discrete graphics for me. IIRC Patrick and Glenn, the people who wrote webrender, by default use integrated graphics anyway (at least one of them does).

Software rendering makes it choke sometimes (other times it works surprisingly smoothly, but it depends on the load), but that is to be expected :)

ronjouch
In https://air.mozilla.org/bay-area-rust-meetup-february-2016/ ,

- At 03:00: pcwalton explains how this experiment leans on the GPU-ization of our Intel CPUs since Haswell.

- At 14:50: slide says "WebRender supports OpenGL ES 2.1 and OpenGL 3.x"

- "Benchmarks" at 26:00 running on his macbook, which may fit what you are looking for

TL;DR, yes this early work is for "integrated graphics such as those in normal laptops". Or try it yourself on your laptop with a nightly build: http://blog.servo.org/2016/06/30/servo-nightlies/

Touche
I think the grandparent was referring to things like startup speed and memory consumption when they said "lighter", not rendering performance.
(For those who might not have already seen.)

Chrome vs Firefox vs Safari vs Servo WebRender: https://www.youtube.com/watch?v=u0hYIRQRiws

May 18, 2016 · 3 points, 0 comments · submitted by 0xmohit
Apr 06, 2016 · clouddrover on Vivaldi Browser 1.0
> The UI is rendered with the browser's rendering engine.

Yes, the performance will matter. But as Servo demonstrates there are a lot of speed gains to be made with the right design.

See this talk by Patrick Walton about Servo's WebRender: https://air.mozilla.org/bay-area-rust-meetup-february-2016/#...

And this short demo comparing Chrome, Firefox, Safari, and Servo: https://www.youtube.com/watch?v=u0hYIRQRiws

Mar 09, 2016 · 2 points, 0 comments · submitted by Mojah
Mar 08, 2016 · 14 points, 2 comments · submitted by wofo
scope
Do I need to open the link to see who'll win (seeing the recent posts of Servo's BLAZING fast WebRender)?
dang
https://news.ycombinator.com/item?id=11175258
None
None
Mar 03, 2016 · 6 points, 0 comments · submitted by jaffathecake
HN Theater is an independent project and is not operated by Y Combinator or any of the video hosting platforms linked to on this site.
~ yaj@
;laksdfhjdhksalkfj more things
yahnd.com ~ Privacy Policy ~
Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.