Skip to content
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

Update Important note section to clarify memory allocation #144

Closed
wants to merge 1 commit into from
Closed

Update Important note section to clarify memory allocation #144

wants to merge 1 commit into from

Conversation

DrShadow34
Copy link

Added example of mem allocation with 4k and changed a previous sentence to mention about uncompressed image

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
Added example of mem allocation with 4k and changed a previous sentence to mention about uncompressed image
@vaxerski
Copy link
Member

a 4K image is 33.1MB uncompressed.

@@ -94,7 +94,7 @@ wallpaper = monitor,contain:/path/to/image.jpg
A Wallpaper ***cannot*** be applied without preloading. The config is ***not*** reloaded dynamically.

## Important note to the inner workings
Preload does exactly what it says. It loads the entire wallpaper into memory. This can result in around 8 - 20MB of mem usage. It is not recommended to preload every wallpaper you have, as it will be a) taking a couple seconds at the beginning to load and b) take 100s of MBs of disk and RAM usage.
Preload does exactly what it says. It loads the entire wallpaper into memory as uncompressed. This can result in unreasonable high mem usage at higher resolutions, as an example: for 4k screen each preloaded image will allocate ~132.7MB. It is not recommended to preload every wallpaper you have, as it will be a) taking a couple seconds at the beginning to load and b) take 100s of MBs of disk and RAM usage.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

"as uncompressed" -> "without any compression"

"unreasonable high" -> "high"

"4k screen" -> no, it depends on your image's resolution, not screen's.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

With first one I agree, I'm not native english speaker and trying to correct readme.md was silly from me to begin with.
Second one - no, that unreasonable high. I got almost 2gb memory consumption from just 11 images, and they using ~140mb on disk.
Third one - no, that make no sense. Like, as example, I preload 16000 × 10216 image, how much that would weight then if it wouldn't be converted to my screen resolution? And why would other image that 400x400 allocate same amount of memory (132.7MB per image) as previous one then?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

2 - 140MB would be like 6000x6000
3 - if it does, that's a bug.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants