August 6, 2020

Improve Firefox Performance on Linux by Turning WebRender On

 WebRender promises to deliver a buttery smooth web for all.

A quick and easy way to improve the performance of Firefox on Linux is to force enable WebRender.

At some point in the near future Firefox will make web render the new rendering engine for all users of the browser, on as many systems as possible. But until that happens you can force enable WebRender on Linux to get the benefits (like reduced CPU usage) ahead of time.

What is WebRender? I’ll let Mozilla explain:

“WebRender […] will replace Gecko’s existing compositor, interfacing with Gecko’s main-thread layout code. As WebRender is written in Rust and uses a very different design approach, we expect to get stability and performance benefits from this switch.”

To be (intentionally) reductive: the feature leverages a system’s GPU to render web content rather than the CPU.

It’s a switch that will improved the performance of Firefox on most systems — we’re talking ‘buttery smooth performance at up to 60 frames-per-second’ improvements. KDE’s Nate Graham reports on the performance gains he felt when using web render on his Wayland system, including better overall battery life from reduced CPU usage.

Mozilla began to enable WebRender in Firefox by default on compatible Windows systems starting September 2018. Since then the tech has slowly rolled out to more users on more systems and across more configurations, including macOS.

But WebRender is not yet default on most Linux systems, regardless of whether it is Wayland or Xorg, using closed source or open source graphics drivers, and so on.

To enable WebRender in Firefox on Linux manually:

  1. Open about:config in a new tab (and okay any warnings)
  2. Search for gfx.webrender.all
  3. Set the value to True to enable WebRender (or false to disable it)
Your own milage will vary when using this feature. You may encounter edge cases or introduce issues after turning it on. But as it’s easy to turn off should any hiccups emerge, the probable performance benefits it offers are worth the hassle of trying it out.

Source: https://www.omgubuntu.co.uk/2020/07/firefox-enable-webrender-linux