Skip to content

Reduce the default memory cache size to 20%.#390

Merged
colinrtwhite merged 1 commit into
masterfrom
colin/reduce_default_memory_cache_size
May 6, 2020
Merged

Reduce the default memory cache size to 20%.#390
colinrtwhite merged 1 commit into
masterfrom
colin/reduce_default_memory_cache_size

Conversation

@colinrtwhite
Copy link
Copy Markdown
Member

@colinrtwhite colinrtwhite commented May 6, 2020

25% of an app's memory works well for image-heavy applications, however it's slightly high for a default - especially since Coil doesn't require a singleton like other libraries. For reference these are the percentages used by other libraries to compute their memory cache sizes:

  • Glide: Depends on display size, only ~12% on my Pixel 1 but can be higher
  • Picasso: 15%
  • Fresco: 25%

@colinrtwhite colinrtwhite requested a review from Jawnnypoo May 6, 2020 04:27
Copy link
Copy Markdown
Member

@Jawnnypoo Jawnnypoo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good call, thanks for looking at this!

@colinrtwhite colinrtwhite merged commit 5b602cc into master May 6, 2020
@colinrtwhite colinrtwhite deleted the colin/reduce_default_memory_cache_size branch May 6, 2020 18:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants