GNOME Shell Performance Improvements in Ubuntu 20.04
The release of Ubuntu 20.04 brings GNOME Shell 3.36 and improved performance in some areas. In this article we will describe the improvements that were contributed by Canonical.
As most Ubuntu users tend to stick to LTS releases they mostly will be upgrading from 18.04. If that’s you then you will also notice a larger set of performance improvements introduced in 19.04 and especially in 19.10. So you might like to read what those are first.
New in 20.04
An animation is just when something moves through both time and space. But even animations that didn’t skip frames (were smooth in time) weren’t looking as smooth as they could be. This occurs when an animation uses an irregular series of positions on screen. Now we sync those positions to the strict interval your screen will emit the photons on, so there’s a slight improvement in visible smoothness.
And since we’re now being very specific about when photons get emitted we can synchronise the screen contents more closely to the mouse pointer (which is actually separate to the screen contents). So when you drag windows around in Ubuntu 20.04 they will stick to the mouse pointer more closely.
It was just trying to store more detail than actually exists in the original wallpaper image. It doesn’t now, but there’s a chance similar mistakes are still lingering elsewhere in the code. So this is the beginning of an ongoing effort to find places where display scaling above 100% might impact performance.
GNOME Shell is built on Mutter via the Clutter toolkit. The Clutter toolkit started as a separate project but is now maintained inside Mutter.
What we can change is how often these allocations happen. And that’s what changing some animations from using
y properties to
Even better than it was in Ubuntu 19.10. This was done using the same approach as in the above paragraph.
If an ancestor doesn’t want to be involved in relayouts, now it isn’t. This doesn’t directly improve performance noticeably, yet, but the new API will make it easier to solve more performance issues in future.
In 3.36, upstream Mutter introduced a new feature to draw multiple parts of the screen separately instead of merging them all into a single draw. The problem was this actually performed slower than 3.34 when the number of things increased. So we introduced a fix to make it perform comparatively to 3.34.
“But I still have performance issues”
We know some issues are still not solved. GNOME Shell’s performance will continue to improve in future releases. But don’t assume anyone else sees the same problems as you do. If you find something that’s not quite fast enough then please let us know by running this command to open a bug:
We look forward to making you even happier in future releases.