swaywm / swaybg

Wallpaper tool for Wayland compositors
MIT License
490 stars 31 forks source link

Reduce memory usage at rest #27

Closed mstoeckl closed 3 years ago

mstoeckl commented 3 years ago

This PR partially addresses #14. See commit messages for details.

There is a new dependency on gio-unix-2.0, to provide the 20 necessary lines of code from g_unix_input_stream_new. This can be removed (at +38/-12 diff cost) if the code switches to using GdkPixbufLoader directly.

emersion commented 3 years ago

Overall this looks pretty good! I do wonder though whether loading the images from a FD is really beneficial. The inode matching allows us to de-duplicate symlinks (does it?), but comparing paths doesn't sound too bad and should account for 99% of the users. Maybe we should consider dropping the first commit?

mstoeckl commented 3 years ago

I do wonder though whether loading the images from a FD is really beneficial

The main benefits were all edge cases:

Maybe we should consider dropping the first commit?

Dropped, and adjusted following commits. The FD loading can always be added in later, if anyone wants it.