-
Notifications
You must be signed in to change notification settings - Fork 62
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Feature Request: Optionally Cache Static Images in Memory #175
Comments
Ah, sorry, this sounds way too complicated. I know that at a high level it seems simple, but we would have to change a lot of things to implement it. For example, we couldn't just cache their bytes, we would also need to keep, at a minimum, their width, height and filename, since we can only use them if all of those match. Things can get annoying with multiple monitors configurations, at varying scale factors, etc. Also, more importantly, I am trying to get memory usage down, not up. This would go completely against that. To get what you want, may I suggest creating a To get something a little randomized (if that's what you want) your script can try recreating the gif every once in a while with different random framerates. |
My use case for this is that I have a different wallpaper for each workspace and want to speed up the transition between wallpapers (right now it's quite slow) when I change workspaces. If I have enough spare time (not likely for a while) I'm happy to try implement this myself and submit a PR. |
I am thinking of maybe implementing this using temporary files. That way, we wouldn't be using RAM. It would still be some ways off though.
Try
Right. Reading the files is not the problem; decoding them is. Decoding is currently the slowest part of the pipeline to get something to the daemon when you call |
Hello,
I'm using swww for my desktop. I have a script that rapidly (anywhere from 1 to 8 times a second) asks the daemon to change the wallpaper between 3 images at varying speeds.
However, swww takes significant power trying to re-read the entire image from disk every swap even when they haven't changed.
Proposed Feature
Add two flags to the
swww img
command:--cache
and--update-cache
.Wallpapers loaded using the
--cache
flag have the image read from a cache in memory, only reading from the file system if the image is not in the cache. Using the--update-cache
option forces the image to be read from the file system, updating the image or adding it to the cache.No change is made to program behavior not involving these flags.
swww
itself does not track files for changes.The text was updated successfully, but these errors were encountered: