meliorence / react-native-image-gallery

Pure JavaScript image gallery component for iOS and Android with high-performance and native feeling in mind

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Anyone tested for large amount of images array?

TayfunCesur opened this issue · comments

Is there anyone tested for hundreds of images array ? I have tested an image array that is about
100-150 lenght. And after some sliding I saw all slided image still in memory and not going anywhere even if you slide 10 pages. I did some research about this issue and this problem caused by maybe ViewPagerAndroid.
I can provide some simple example of this issue very soon. Thanks

I have and it's crashing on me tested on 40+ images

I really can't understand how all images sitting in memory after many many pages slided ? It seems ViewPagerAndroid bugs ?

@TayfunCesur @justinsoong Did you try with 2.1.4? I think it was working quite OK with lots of images.

I also have 40+ images, but for the some images they not able to load and display 'Image cannot ..' message on the real device.

@kukadiajayesh you are probably running into memory issues. You need to reduce the amount of content you are showing and keeping rendered at once.

@vbuch ofc we got oom errors. But if you are developing a photo gallery app, how do you reduce the amount? It's also unknown!

@TayfunCesur I'd say that if you are developing a photo app, you should be doing a native approach and not react native that adds on top of your already limited resources. You could ttry reducing the sizes of the rendered images. Also make sure you are not leaving stacked screens on top of each other. Every thing that reduces the amount of memory you can use is a point for you to play... react-native-image-gallery is great but it cannot be a full-featured gallery app...

We were having this exact issue with image arrays > 10 in size. The tenth image would work fine on simulator / phone - but not the 11th onwards. This is specific to version 2.1.5; but for the same set of images, 2.1.4 works perfectly - as mentioned by @vbuch