question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

<Image> take up a lot memory on Android

See original GitHub issue

Is 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

image

Steps to Reproduce

  1. build a button that allow user to chose multiple image (I am using react-native-image-crop-picker for Android
  2. display these image in a <FlatList>
  3. select >20 image can cause App take 400~600MB memory.
  4. 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

image 369MB memory and keep growing to 400+mb image

image

Thanks for reading 😄

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Reactions:9
  • Comments:17 (2 by maintainers)

github_iconTop GitHub Comments

6reactions
kelsetcommented, Mar 1, 2018

@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).

2reactions
1c7commented, Jan 31, 2018

demo app video is done:

https://youtu.be/Vgq-P826aqw

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found