Using ImageDecoder uses lots of memory on Android U (and maybe other Android versions)
- Dominant language
- Java
- Stars
- 35k
- Forks
- 6.2k
- Avg merge
- 4d 1h
- Merged PRs (30d)
- 8
Description
I apologize for the lack of a proper write-up, but I observed a large increase in memory allocation when using ImageDecoder to decode images instead of Bitmap factory.
github won't let me attach hprofs, but I observed a 4X increase in memory allocation of com.bumptech.glide.load.engine.bitmap_recycle.LruArrayPool. I don't understand what the cause is yet.
This large increase in memory allocation can leads to ANRs and OOMs in client apps.
Contributor guide
Research direction
Start by reproducing the Android U comparison between ImageDecoder and Bitmap factory, then profile allocations involving com.bumptech.glide.load.engine.bitmap_recycle.LruArrayPool. The issue does not name a source file or test, and hprof files are unavailable. Done means identifying the cause of the reported allocation increase and confirming whether it can be prevented without the ANRs or OOMs.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java
- Domain
- mobile, performance
- Issue type
- Bug
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 20/100