zzag / plasma5-wallpapers-dynamic

Dynamic wallpaper plugin for KDE Plasma
328 stars 18 forks source link

kdynamicwallpaperbuilder need thread limiter or arg for limiting thread/cpu usage via command line #90

Closed onuralpszr closed 2 years ago

onuralpszr commented 2 years ago

Today, I installed via Fedora RPM and tried with 5k res with 96 pictures with json file and start using all of the CPU/Memory available

It would be really nice to have limiting CPU because it is uses everything it can and I have 16 Core / 32 GB RAM and use all of them.

zzag commented 2 years ago

kdynamicwallpaperbuilder needs to use "online encoding", i.e. fetch an image, add it to the wallpaper, and forget about it. That's how things used to work with libheif. With libavif, I didn't wrap my head fully around its encoding api so the builder fetches images all at once, which can be a big problem if you have 96 5K pictures. I will try to get it fixed before the release.

zzag commented 2 years ago

Even with loading images one-by-one, the encoding step is still a very memory hungry process. :(

zzag commented 2 years ago

I added the thread option and made the builder load images one by one, not sure what else can be done. If there's something that can be done to improve memory usage during the encoding step, please let me know.