Live data from Hacker News

The web at maximum FPS: How WebRender gets rid of jank

hacks.mozilla.org

141–150 of 212 posts

Re: The web at maximum FPS: How WebRender gets rid of jank

#141

Great write-up - thanks for sharing. The name "WebRender" is unfortunate though. Things with a "Web" prefix - "Web Animations", "WebAssembly", "WebVR" - are typically cross-browser standards. This is just a new approach Firefox is using for rendering. It doesn't appear to be part of any standard.

I remember reading at some point that WebRender could actually be isolated relatively easily and then applied to basically any browser. That sort of already took place, going from Servo over into Gecko.

So, it might actually turn into somewhat of a pseudo-standard.

Re: The web at maximum FPS: How WebRender gets rid of jank

#142
post #113

Why are they so obsessed with 60 fps? 120 fps looks considerably better, and there are other effects like smear and judder that significantly decrease even with significantly higher frame rates, say 480 fps [1]. [1] http://blogs.valvesoftware.com/abrash/down-the-vr-rabbit-hol...

We're not as other people have said in other comments. On normal content you can often see WebRender hit 200+ fps if you don't lock it to the frame rate. To see this for yourself, run Servo on something with -Z wr-stats which will show you a performance overlay.

Re: The web at maximum FPS: How WebRender gets rid of jank

#143
post #69

Earlier quoted context omitted.

I think it's still in Nightly which is 58 now. I'm running 57 beta on Win10 and my about:support page says "unavailable by runtime: Build doesn't include WebRender".

I think WebRender is still off by default in 58 Nightly.

Right, but "off by default" is different from "not included in this build".

Re: The web at maximum FPS: How WebRender gets rid of jank

#144

Is WebRender working on Android Firefox Nightly yet? Update: about:support says not ready for Android

On nightly, the flag is available in about:config and I alreay enabled it.

Yeah, but check about:support, it'll say not ready

Re: The web at maximum FPS: How WebRender gets rid of jank

#146

> What if we stopped trying to guess what layers we need? What if we removed this boundary between painting and compositing and just went back to painting every pixel on every frame? This feels a bit like cheating. Not all devices have a GPU. Would Firefox be slow on those devices? Also, pages can become arbitrarily complicated. This means that an approach where compositing is used can still be faster in certain circ…

Actually, virtually every device the average grade consumer uses, has a GPU. For instance, even Atom processors have GPUs. Granted, they don't have as much cores as a full-fledged nVidia GPU, nor as much dedicated memory, but they are still GPU with several tens of cores and specialized APIs that were designed specifically for the tasks at hand. Plus, they offload (ish) the CPU.

Something without a GPU: VirtualBox. Last time I tried a Servo nightly in VirtualBox (to be fair, a few months ago), it immediately crashed/aborted with a GPU-related error.

I think there's a good argument for preventing security-critical apps from raw GPU access, because graphics cards and drivers are a huge amount of attack surface.

I still think WebRender is the way forward, but I hope they get it working with something like llvmpipe.

Re: The web at maximum FPS: How WebRender gets rid of jank

#147
post #108
post #87

Earlier quoted context omitted.

I've been working professionally with Rust for a year now. When I got over the first wall, it has become the best tool I've had for creating backend applications. I have history with at least nine different languages during my professional career, but nothing comes close giving the confidence and ergonomics than the tools Rust ecosystem provides. Firefox, especially the new Quantum version is awesome. But Rust as a s…

nice! can you talk more about Rust's tooling? How do you debug? What IDE or text editor do you feel comfy with? Do you have/use/need autocomplete? I'm coming from a a Python background and I'm too spoiled by Pycharm's insane tooling and autocomplete and stuff.. I wanna trail de Rust path too! thanks in advance.

> nice! can you talk more about Rust's tooling? How do you debug? What IDE or text editor do you feel comfy with? Do you have/use/need autocomplete?

For writing code, I've been using IntelliJ with the Rust plugin for the past year.

Autocomplete works pretty well, there is Cargo integration so you can edit your dependency file in IntelliJ and things will automatically update so that autocomplete and documentation (go to definition) for the newly added dependencies start working immediately.

There is also simple build/check/run support, with build and test output appearing in the lower panel inside the IDE. There are some quirks, but they have been very minimal.

I've never used IntelliJ to debug Rust itself, because in most of the projects I've worked on, the Rust code has been designed as a completely separate library with a semi-public API, intended for embedding in another language like Swift or C#.

So the debugger has almost always been Visual Studio or Xcode, but it works exactly as I would expect even without using any sort of Rust plugin for either one.

The other day I was stepping through the call stack to find the source of a crash (one that I caused by failing to keep the P/Invoke signatures up to date with our Rust functions), and Visual Studio switched right from C# to Rust from one frame to the next, showing the source code and the line where the crash occurred in Rust.

Really I can't think of anything that has been even a moderately significant problem, it's been great all around.

Re: The web at maximum FPS: How WebRender gets rid of jank

#149
post #113

Why are they so obsessed with 60 fps? 120 fps looks considerably better, and there are other effects like smear and judder that significantly decrease even with significantly higher frame rates, say 480 fps [1]. [1] http://blogs.valvesoftware.com/abrash/down-the-vr-rabbit-hol...

I don't think, they are obsessed with 60 FPS, that's just what for most people is synonymous to a smooth experience and is often not met by browsers at this point in time.

Here's for example an early demo showing Wikipedia at ridiculous frames per second (starts at 0:26:00): https://air.mozilla.org/bay-area-rust-meetup-february-2016/

In the video, he says 500 FPS, but assuming there's no more complicated formula behind this, I think it would actually be 2174 FPS. (0.46 ms GPU time per frame -> 1/0.00046s = 2173.913 FPS)

Re: The web at maximum FPS: How WebRender gets rid of jank

#150

Great write-up - thanks for sharing. The name "WebRender" is unfortunate though. Things with a "Web" prefix - "Web Animations", "WebAssembly", "WebVR" - are typically cross-browser standards. This is just a new approach Firefox is using for rendering. It doesn't appear to be part of any standard.

I remember reading at some point that WebRender could actually be isolated relatively easily and then applied to basically any browser. That sort of already took place, going from Servo over into Gecko. So, it might actually turn into somewhat of a pseudo-standard.

You send display lists to it over IPC, and it's easy enough to generate those from C++. It has a well defined API boundary, which makes it easy to use.

This is in stark contrast to the style engine in Servo which relies on memory representation to be fast. So integrating it requires very tight coupling of data structures.

Post reply on HN