Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[feature/optimize-memory-cache] Implementation of Memory Cache Optimization for Image Picking in Android #36

Merged
merged 1 commit into from
Dec 30, 2023

Conversation

onseok
Copy link
Owner

@onseok onseok commented Dec 30, 2023

close #35

Changes

  • PeekabooBitmapCache: Implemented a new singleton class PeekabooBitmapCache to handle memory caching of bitmap images in Android. This class utilizes an LruCache to store and retrieve bitmap images efficiently, optimizing memory usage for image picking.

  • Memory Cache Size Calculation: Implemented a method within PeekabooBitmapCache to calculate the optimal cache size based on the available runtime memory. The cache size is set to 25% of the maximum available memory, with a minimum threshold of 1MB, and this 25% allocation is inspired by the memory caching policy used in the qdsfdhvh/compose-imageloader project.

@onseok onseok merged commit 50f6bb0 into main Dec 30, 2023
2 checks passed
@onseok onseok deleted the feature/optimize-memory-cache branch December 30, 2023 14:54
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.

Support Memory Cache for Image Picking in Android
1 participant