xyproto/wallutils

Unreasonably high memory usage on settimed

n5q opened this issue · 8 comments

n5q commented

I am currently running settimed (feh backend) which was installed as part of the wallutils package (5.9.0-1) on i3-gaps (4.18.2-2) under Arch Linux. The program works as intended, fading between wallpapers throughout the day however I have noticed that the program uses an unreasonable amount of memory while running in the background regardless of if the program is launched via the i3 config file or manually.

I am using the options settimed -m zoom /usr/share/backgrounds/gnome/adwaita-timed.xml which does set the desired wallpaper however it takes up over a gigabyte of memory.
Screenshot from 2020-08-25 12-05-56

Running the program manually produces the following output

Launching event loop for: /usr/share/backgrounds/gnome/adwaita-timed.xml
Using the GNOME Timed Wallpaper format
Initial transition event at 08:00 (82% complete)
Progress: 4h7m38s
Up to: 13:00
Window: 5h
Cooldown: 30m
Loop wait: 5s
Transition type: overlay
From filename /usr/share/backgrounds/gnome/adwaita-morning.jpg
To filename /usr/share/backgrounds/gnome/adwaita-day.jpg
Setting /usr/share/backgrounds/gnome/adwaita-morning.jpg.
Using the Feh backend.
feh --bg-fill /usr/share/backgrounds/gnome/adwaita-morning.jpg
Crossfading between images.
Setting /tmp/_settimed.jpg.
Using the Feh backend.
feh --bg-fill /tmp/_settimed.jpg
Activating events in 15m

Thanks for reporting! I'll look into this.

n5q commented

It appears as if this is only an issue when there is a transitioning wallpaper as it is now using 140mb of memory when not transitioning. Still high memory usage but not as bad as before

n5q commented

Possible memory leak when transitioning?

Cross-fading two large images in memory uses some memory, so it's not entirely unreasonable, but I'm planning to both rewrite and profile settimed.

i ran into the same problem, but in my case it was using some gb of ram ! i am on archlinux, using wallutils version - 5.9.0-2

I have rewritten the event system and updated the settimed command. Could you please check if settimed from the main branch now works as expected?

This might also be improved when compiling with Go 1.17.

There's a new release of wallutils: 5.10.0. Please re-open this issue if this should still be a problem.