-
-
Notifications
You must be signed in to change notification settings - Fork 5.4k
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
LottieCompositionCache cache memory #2260
Comments
@zijinzhiyun Is there an alternative you'd like to propose? What's wrong with the current implementation for your use cases? 20 refers to the number of items, not the number of mb. |
yep,If we know how to calculate memory size correctly,we can try to limit the memory |
In my project, a single Lottie may take up to 200Mb of memory |
Perhaps, we can manually remove the cache or disable cache |
@gpeal look here |
Sorry, we didn't reply in time. Calculate the size of each object in the LottieComposition class, plus the memory of bitmap. In using svga libraries like lottie, I use this method. The problem with this solution is that the calculated memory value is not accurate enough. I don't know if you have a better solution. |
You can call |
Lottie is supported and developed on nights and weekends. Issues from Lottie sponsors will be prioritized.
Describe alternatives you've considered
LottieCompositionCache cache 20, but the size of each LottieComposition is different.In the gift scenario, the size of LottieCompositionCache may be 50M. The number of caches is not a good solution
The text was updated successfully, but these errors were encountered: