Gamma-corrected gradients are much slower to draw than linear gradients
Issue Description
Since 4.19.5 (older 4.19.x versions fail to build for me) wallpaper loading is slow.
Takes ~4s on my system (see specs bellow), while pegging a single CPU core to 100%, with image file size not making a difference (4K jpegs between 500KB - 1.6MB).
Also, during login/startup there's a black background/desktop in place of wallpaper, until it's loaded. This wasn't the case with 4.18.
Main issue there is a somewhat jarring sequence of: (lightdm) wallpaper -> black desktop for 4s -> wallpaper again (I use the same image for both lightdm and desktop in which case with 4.18 the switch (from lightdm to xfdesktop) was completely invisible, not even a flicker).
There is no black background when changing wallpapers from settings, previous one is retained on screen until new one is loaded, however it's also slow (same ~4s of loading).
Running with debug enabled (-e) is not giving much info, except for one thing. The stall happens before the line bellow is printed on the terminal. In fact, it's printed almost simultaneously with wallpaper getting (finally) drawn:
DBG[xfdesktop-backdrop-renderer.c:606] xfdesktop_backdrop_render(): loading image /home/filip/Pictures/Wallpapers/4k-ultra-hd-background-blur-moss-green-dark-nature-macro.jpg
Build with --enable-debug=full is slightly more helpful. Following is printed, followed by a 4s stall:
DBG[xfdesktop-backdrop-manager.c:881] create_backdrop(): Creating backdrop from setting prefix /backdrop/screen0/monitorHDMI-A-0/workspace0
I guess the cause is something in (xfdesktop-backdrop-manager.c) create_backdrop()
or in xfdesktop-backdrop-render()
(up to XF_DEBUG("loading image %s", g_file_peek_path(image_file));
line, since that one is printed when wallpaper gets finally drawn).
Here's the full term output from a git master full debug build (as of 916a6d42): xfdesktop-master-full-debug-output.log
(comments added by me where the stall occurs + line spacing to separate out each wallpaper change)
There is no speed difference between a full debug, default and -march=native/-O3/LTO optimized builds (all take ~4s)
Steps to Reproduce Issue
- Observe behavior (black desktop/wallpaper) during login
or - Change wallpaper to a different one and observe how long it takes to switch
Expected Behavior
- Retain what was previously on screen until wallpaper is loaded (instead of blacking it out)
- And/or enable (Speedy) Gonzales mode for wallpaper loading/drawing
😁
Additional Information
Will provide any further info as needed/requested.
Environment & Versions
- System:
- Phenom II X6 @3.8GHz, 16GB RAM, Radeon RX570, Intel 545s SSD (SATA III, ext4 root)
- OS distribution and version: Debian 12
- Overall Xfce version: 4.20pre1
- xfdesktop version (git hash if not a release): 4.19.5 && 4.19.6 && git master at 916a6d42
- Windowing system (X11/Wayland): X11
- Compositor and version (if Wayland): xfwm 4.19.0
- GTK Theme: Custom Matcha
- Icon Theme: Vibrancy Color Dark
- UI Scale Factor: 1x (130DPI)