Introduction to WebRender
mozillagfx.wordpress.com
mozillagfx.wordpress.com
The only part missing, is Firefox slightly slower startup time (although that improved as well).
Then once WebRender lands, well, who knows? I assume Google are planning something in response - the continued dominance of Chrome is worth considerable $billions to them...
TabGroups was really unique in that it felt (to me) like the kind of interaction-redefining change that tabbed browsing was in the first place. I'm adjusting myself to using virtual desktops and KDEs WM-level tabs to compensate, but I still miss the addon.
I’m surprised the built in containers left behind the extensions option to always a url open in a specific container. To me that’s the unique interesting bit — my banks can always be in my banking container, Facebook in a social, etc. By having the browser force the mapping I can make sure that I minimize cross-contamination, reducing attack surface area and increasing privacy.
Disclosure: I work at Microsoft, not on anything related to graphics rendering or the compositor though.
As for scrolling, it is more work for us to match the OS scrolling behavior, for sure. But it can be overcome with effort and attention to detail.
It's also important to note that adapting the CSS 2.1 Appendix E painting model to an OS compositor is itself an impedance mismatch. I wouldn't be surprised if WR's approach ends up being less code overall, simply by avoiding the need to shoehorn CSS into the OS compositor (which is also platform specific code). That's before you get into the large performance benefits you get from global optimizations like Z-culling, which generally aren't available when using the system compositor.
You might think so. And yet, Android Firefox's non-native scrolling behavior continues to be totally awful. Has been for years. So many apps and websites fall into the trap of thinking that reimplementing OS scrolling is easy.
I'm not saying it's the wrong decision, but know that you are signing yourself up for not just a ton of work now, but also a ton of work in the future to match platform changes.
Who said it was going to be easy? :)
> I'm not saying it's the wrong decision, but know that you are signing yourself up for not just a ton of work now, but also a ton of work in the future to match platform changes.
It's important to remember that Chrome (on non-Android platforms) and Firefox already implement scrolling manually. This isn't anything new.
Chrome on Android also implements scrolling manually. Just since Android is open-source they can pretty trivially port the platform's code to their system to stay in sync rather than reverse-engineering the curves.
(Keep in mind that back in those days—the days of Froyo and Gingerbread—I was way more concerned with not having the whole browser crash due to absurd bugs in the Adreno 200 drivers than replicating minute scrolling details. Times change.) :)
Comparing it with Chrome now for the first time, Chrome scrolls up a lot of the page with even a small swipe, while Firefox only does that when you make a larger swipe.
DirectComposition powers a lot of that and I bet web devs will want that kind of stuff too. Notice things like per-element shadows that are lit by global (OS-wide) lights.
I'm also looking to optimize smoothness on window resize, which I've noticed to be pretty janky in many applications.
No Chrome processes until I actually launch Chrome.
Can you verify?
Unfortunately I cant google it to find out If i remember it correctly.
Wanting to lead is good, but will not take you anywhere is no one is using your browser.
All the other science project are not good, so please scrap them now.
I know I sound like an asshole, but it's only because I think Firefox is my last chance for a free web and am disappointed with the route it takes.
I really wish they prove me wrong and in 2-3 years Firefox will be a marvel, re-written from scratch in Rust, but I am afraid that even if that's the case it will be too late.
Good thing that's not what's happening.
None of the major Servo/Quantum features in question, including WebRender, are expected to be faster because they're written in Rust. Rather, they're expected to be faster because they've been designed from the ground up for modern hardware (in the case of Stylo, multicore CPUs; in the case of WR, GPUs).
Additionally Mozilla is not re-writing anything from scratch, instead working toward integrating components from Servo into Firefox.
As HN resident pcwalton says: “The immediate next step for Pathfinder is to integrate into WebRender as an optional accelerated path for applicable fonts on supported GPUs.”
WR rasterizes glyphs into font atlases and uploads those to the GPU. Those atlases are cached for use later and can be selectively updated if need be.
We also are working on path rasterization on the GPU with Pathfinder, so that will handle the other use cases plus things like SVG.
This, for example, is how Android deals with this ( https://medium.com/@romainguy/androids-font-renderer-c368bbd... )
1. async/await. This is analogous to async/await in C# and ES6, and should make the syntax a lot nicer. https://github.com/alexcrichton/futures-await
2. Coroutines. This is the supporting technology for async/await. https://github.com/rust-lang/rfcs/blob/master/text/2033-expe...
3. 'impl Trait'. This provides a way to say, "Look, my return type implements 'Trait', but the actual type declaration is way to tedious to write out, and anyway, it's private. This will help a lot with cleaning up complex Tokio types. https://github.com/rust-lang/rfcs/blob/master/text/1522-cons...
At work, we use Rust, but we're avoiding using Tokio until these features land.
Is it? It's freaking hard to make http code in rust at all. I just checked it's source and they use some old hyper's methods inside, which aren't available in recent versions. So you can use it only with tokio. Tokio is nightmare who those, who tries to learn rust. And I can't find a way around it.
> At the moment I expect they're in the same boat as ekidd, waiting for the async/await experiments to yield fruit.
I think that almost all rust users/devs there right now.
The simple way is: spawn a background thread, make a channel, pass the write end to the background thread, issue the http request synchronously using whatever crate you want on the background thread, write the result back over the channel, and exit the background thread. In the main thread, poll the read end of that channel from your event loop.
Rust decided not to ship with a scheduler/runtime built in like Go and Node.JS have. This makes you do a little more work for this kind of thing, in exchange for finer control than a language with a runtime can provide.
The only Rust code in Firefox's network stack is the URL parser. The rest of the stack is in C++, and I believe it handles async.
Servo's network code is still pretty premature. I plan to poke at tokio-ifying it at some point, or at least having better thread pooling.