Yes
Yes
Environment:
OS: macOS High Sierra 10.13.2
Node: 8.9.4
Yarn: 1.3.2
npm: 5.6.0
Watchman: 4.9.0
Xcode: Xcode 9.2 Build version 9C40b
Android Studio: 3.0 AI-171.4443003
Packages: (wanted => installed)
react: 16.0.0 => 16.0.0
react-native: 0.51.0 => 0.51.0

react-native-image-crop-picker for Android<FlatList>it doesn't take that much memory and cause app crash.
take about 400mb to 600mb memory. then my app crash
Video demo(2 minute 38 second): https://youtu.be/zL1heevcWpk

I am writing a demo using RN 0.52, would post it here once it done

369MB memory and keep growing to 400+mb


Thanks for reading :smile:
I am writing a demo for this, would post link here soon.
and also make a video with that demo.
react-native run-androidhttps://github.com/1c7/react-native-image-memory-problem-demo-app
easily reproduce the problem. hope it help.
This is an interesting bug, will try to reproduce the issue.
@gedeagas Thanks!
to reduce the memory usage you can try to add removeClippedSubviews={true} to your FlatList
then you should find a workaround for this old issue: #1831 / #368
we add a +1 scroll on componentWillReceiveProps
@aknad Thanks! would try.
I hope someone can take a look into this issue fast,
display image in a list is quite a common scenario.
btw,
I have a old app(React Native 0.46) using ListView and loading image from Network.
it display a lot image, that list have like 300 item, but it work just fine. everything is smooth.
not sure this high memory problem is with FlatList?
or just display local image/network image are different,
somehow display local image is more difficult? need more work on downsampling or something?
if want try the old app I mention above, you can download here: https://www.coolapk.com/apk/com.crashcourse.china.c17
it's not on Google Play Store.
and also this is not an advertisement for my app,
I am just trying to provide more info to help diagnose this problem.
Thanks for posting this! It looks like you may not be using the latest version of React Native, v0.53.0, released on January 2018. Can you make sure this issue can still be reproduced in the latest version?
I am going to close this, but please feel free to open a new issue if you are able to confirm that this is still a problem in v0.53.0 or newer.
I don't have time to retest this in 0.53.
I can confirm this is an issue in 0.53.
Using removeClippedSubviews does mitigate the problem, but this isn't necessary on iOS as loading large lists of images doesn't grow memory usage in the same way.
@mattmcdonald-uk so in 0.53, iOS doesn't have this problem, but Android still does?
@1c7 Exactly
@react-native-bot reopen
Something went wrong executing that command, @hramos could you take a look?
@mattmcdonald-uk please refer to #13413, so that we avoid redundancy - the core team is aware of this Android+Flat/SectionList+Images issue (going to write a follow up there).
Most helpful comment
@mattmcdonald-uk please refer to #13413, so that we avoid redundancy - the core team is aware of this Android+Flat/SectionList+Images issue (going to write a follow up there).