darickc / MMM-BackgroundSlideshow

MIT License
135 stars 78 forks source link

resizeImages eats RAM #125

Open christf opened 1 year ago

christf commented 1 year ago

this works like a charm on my raspi3, however when I enable resizeImages and use a large amount of fotos, then the raspi will crawl to a halt using kswapd. Indeed, top reports hardly any free RAM left. With the option disabled, there is >300MB free memory.

Does this option keep the resized images in RAM? What can be done to stop it? Imho it hsould only be resizing the upcoming image and cache it. After it was displayed, the resized image should be forgotten to enable larger slide decks. Mine contains 25 images but apparently this already is more than is suitable.

looolz commented 1 year ago

I don't really know how to check the metrics on the rpi3, but I suspect the same issue is going on here. After adding "more" images, the display grew increasingly unstable. I'm testing now with resizing my images to fit the 1080x1920 display running the mirror

looolz commented 1 year ago

Can confirm, this works. Mirror has been stable since I scaled all images to 1080x1920 (which is the resolution of the display I'm using). Images average at around 1 MB each.