A Big Performance Fix Is Pending For WebKit / WPE On Wayland
Written by Michael Larabel in Wayland on 21 April 2022 at 06:05 AM EDT. Add A Comment
WAYLAND --
Chris Lord at Igalia has recently been looking at the WebKit browser engine performance as it concerns embedded devices. From this work he found that WebKit with its WPE port for embedded devices was found to be performing rather poorly on Wayland. Patches are now pending to address two uncovered issues.

Lord noticed that when a frame exceeds the 16.67ms / 60 FPS rendering budget, WebKit/WPE with the Wayland back-end will hard-drop to rendering at 30 FPS while that is not the case with other browsers. In analyzing the situation he summed it up as:
In summary, there are two identified bugs, or at least, major differences in behaviour with other browsers here, both of which affect both fluidity and synthetic test performance. I’m not too concerned about the latter, but that’s a hard sell to a potential client that’s pointing at concrete numbers that say WebKit is significantly worse than some competing option. The first bug is that if a frame goes over budget and we miss a screen refresh (a vsync signal), we wait for the next one before kicking off rendering again. This is what causes the hard drop from 60fps to 30fps. As it concerns Linux, this only affects the Wayland WPE backend because that’s the only backend that implements vsync signals fully, so this doesn’t affect GTK or other WPE backends. The second bug, which is less of a bug, as a reading of the spec (steps 9 and 11.10) would certainly indicate that WebKit is doing the correct thing here, is that the timestamp given to requestAnimationFrame callbacks is the current time and not the vsync time as it is in other browsers (which makes more sense for timing animations).

There are currently unmerged patches worked on by Lord for addressing these performance issues with WebKit/WPE on Wayland.


While a synthetic test, with the two fixes worked on it takes the MotionMark browser benchmark score from 35 up to 233... Quite the improvement and the rendering latency results are also in much better shape.

More details on Lord's blog.
Related News
About The Author
Author picture

Michael Larabel is the principal author of Phoronix.com and founded the site in 2004 with a focus on enriching the Linux hardware experience. Michael has written more than 20,000 articles covering the state of Linux hardware support, Linux performance, graphics drivers, and other topics. Michael is also the lead developer of the Phoronix Test Suite, Phoromatic, and OpenBenchmarking.org automated benchmarking software. He can be followed via Twitter, LinkedIn, or contacted via MichaelLarabel.com.

Popular News This Week