Piwigo / piwigo-flutter-app

Piwigo mobile application for Android
GNU General Public License v2.0
83 stars 26 forks source link

App crashes when scrolling through large albums #176

Open Nologist opened 5 months ago

Nologist commented 5 months ago

Hi again,

hope you're doing well.

I discovered a problem with the Piwigo app that comes up when you scroll through larger categories. It seems like all the Thumbnails that have been loaded while scrolling are kept in memory. At some time, the device runs out of memory and the app crashes. Depending on the thumbnail-quality setting and the available memory, you're experiencing the impact of the high memory consumption after approx. 400 loaded thumbnails.

Is there a way to unload passed thumbnails on demand, similar to loading but in reverse? I mean something like: When you scroll down, the app loads the next 500 thumbnails below and unloads all above. When you scroll up, the app loads the previous 500 thumbnails above und unloads all below.

To keep the scrolling position, you could preserve the images dimensions and clear its contents only. Just as a suggestion.

I would classify this one as a bug.

Best regards Sven

Catfriend1 commented 4 months ago

A Thumbnail cache would be nice ... :)

remi-martin commented 3 months ago

Hi, I have to admit I 'm struggling to solve the image memory issue. I've looked to some packages for that but it's still crashes.