You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Is your feature request related to a problem? Please describe.
Currently Lottie animations are cached by default and it is required to add the app:lottie_cacheComposition="false" flag in the xml on a per LottieAnimationView basis. This is a fairly easy thing to miss in cases where we do not desire a cache which can lead to large animations remaining in memory when we do not need them to be.
Describe the solution you'd like
Ideally this could be solved by a simple boolean field on the LottieConfig class to indicate if we want to globally default the cacheComposition value to false.
Describe alternatives you've considered
The only other alternative I see is to use LottieCompositionFactory.setMaxCacheSize and set it to 0 which totally disables the cache. While this may work for some, this does not work in cases where we want to selectively cache specific animations while not caching the majority of them.
Other future iterations could be a cap on memory size for the cache or maybe a configuration to only cache animations under a specific size.
The text was updated successfully, but these errors were encountered:
Is your feature request related to a problem? Please describe.
Currently Lottie animations are cached by default and it is required to add the
app:lottie_cacheComposition="false"
flag in the xml on a perLottieAnimationView
basis. This is a fairly easy thing to miss in cases where we do not desire a cache which can lead to large animations remaining in memory when we do not need them to be.Describe the solution you'd like
Ideally this could be solved by a simple boolean field on the
LottieConfig
class to indicate if we want to globally default thecacheComposition
value to false.Describe alternatives you've considered
The only other alternative I see is to use
LottieCompositionFactory.setMaxCacheSize
and set it to 0 which totally disables the cache. While this may work for some, this does not work in cases where we want to selectively cache specific animations while not caching the majority of them.Other future iterations could be a cap on memory size for the cache or maybe a configuration to only cache animations under a specific size.
The text was updated successfully, but these errors were encountered: