facebook/fresco

Memory cache keeps growing when using non-static images in Recyclerview

Aberta

#2.502 aberto em 19 de mai. de 2020

 (7 comentários) (0 reação) (0 responsável)Java (3.750 forks)batch import
enhancementgood first issuehelp wanted

Métricas do repositório

Stars
 (17.072 estrelas)
Métricas de merge de PR
 (Nenhuma PRs mesclada em 30d)

Description

Description

I'm using lots of .webp images in my Recyclerview. And if I keep scrolling the Recyclerview, the native memory keeps growing until it reaches the maximum memory cache limit. I've also tested with the demo by jumping between fragments which has .webp images in it, still the native memory grows to the limit. It looks like Fresco will create a new cache for the same image every time the image got loaded.

I've already tried several ways, like reduce the memory cache limit or clear memory cache every time I leave the page. but these solutions can't solve the problem without affecting user's experience. Is there any way to fix or avoid this problem?

Reproduction

Any app that is using Fresco to load non-static images should be able to reproduce this problem.

Additional Information

Using .gif format has the same problem.

  • Fresco version: [2.2.0]
  • Platform version: [Android 9 / 10] (I've only tested with these two version)

Guia do colaborador