Skip to content

background: Improve preview performance

Since 7cef6dc5, the background previews are rendered at the full resolution. However, this is expensive and causes considerable lag, especially for resizes. Since then, the thumbnail size has doubled to 256 pixels, making the previews sharper even at larger sizes.

So, to improve performance, let's effectively revert 7cef6dc5. The revert is not possible without disabling frame = 0 retrieval, since that is broken for non-slideshow backgrounds and was not used before anyways with force_size = TRUE.

Related to #674 (closed)
Related to #704 (closed)
Related to #2448 (closed)

For context, when 7cef6dc5 was committed, the preview size was larger, but also the thumbnail size was 128 pixels. That was later increased to 256 pixels (gnome-desktop@c5872652).

I am using quite a decent and modern PC, with a Ryzen 5600X and RX 480, so this full resolution draw must be expensive to cause this much lag. With this fix, I don't see any resizing lag now, and the panel load is also noticeably snappier.

Before
Screencast_from_2023-11-23_01-26-00

After
Screencast_from_2023-11-23_01-25-15

Now, obviously this may result in less sharpness, but even on my 1440p monitor at 2x scaling I am having a hard time noticing any difference. But I marked it draft to get feedback on this. That's also why a marked the issues as related and not as fixed (yet).

Edited by Matthijs Velsink

Merge request reports