bumptech / bumptech/glide

Using ImageDecoder uses lots of memory on Android U (and maybe other Android versions)

Open
#5,359 0 comments 0 reactions 0 assignees View on GitHub
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

Open the contributing 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.