zzag / plasma5-wallpapers-dynamic

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

Make KDynamicWallpaperWriter consume less memory #94

Closed zzag closed 2 years ago

zzag commented 2 years ago

There are several issues with the current API design:

In order to "solve" those problems, the API of KDynamicWallpaperWriter was changed so it takes metadata and images before starting writing.

Conceptually, that is great, but loading all images in RAM is not great plus AV1 encoders consume ridiculously too much memory.

As a compromise, this change makes the KDynamicWallpaperWriter take image views and load images on demand. This slightly reduces memory usage but it looks like avifEncoder API is not really great for online encoding, so memory usage when building a dynamic wallpaper is still high.

90