<Image> take up a lot memory on Android
See original GitHub issueIs this a bug report?
Yes
Have you read the Contributing Guidelines?
Yes
Environment
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
Steps to Reproduce
- build a button that allow user to chose multiple image
(I am using
react-native-image-crop-picker
for Android - display these image in a
<FlatList>
- select >20 image can cause App take 400~600MB memory.
- app could crash, depending on if the phone is high-spec or low-spec, cheap phone are more likely to crash since it has less memory
Expected Behavior
it doesn’t take that much memory and cause app crash.
Actual Behavior
take about 400mb to 600mb memory. then my app crash
Reproducible Demo
-
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
-
Here is Image( I also post them in https://github.com/facebook/react-native/issues/17142)
369MB memory and keep growing to 400+mb
Thanks for reading 😄
Issue Analytics
- State:
- Created 6 years ago
- Reactions:9
- Comments:17 (2 by maintainers)
Top Results From Across the Web
xml images are taking up too much memory - android
Compressed In Memory Format. Android provides the alternate 565 format, which uses only 16 bits per pixel, instead of the 32 bits for...
Read more >Why do some pictures taken on my phone take up more ...
The 'Other' category in storage space of smartphones usually takes up a lot of storage because it consists of Android OS cache, some...
Read more >Free up space on your device - Android - Google Photos Help
For backed-up photos and videos, use Photos' storage management tool to surface items that you might want to delete, like blurry photos, screenshots,...
Read more >Loading Large Bitmaps Efficiently - Android Developers
An image with a higher resolution does not provide any visible benefit, but still takes up precious memory and incurs additional performance ...
Read more >How to Free up Space on Your iPhone and Android Phone
In your Settings for Google Photo on your Android phone, there is an option to “Free up device storage” that with remove any...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@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).
demo app video is done:
https://youtu.be/Vgq-P826aqw