At the company I work for we use lottie files for everything, animations, icons and static "images". We noticed for the case when the lottie is static there is still an animation running, which hurts performance overtime if we consider an app with lots of these. Also, it makes tests harder as there will be always frames to be pumped.
The solution is simple. All you need is to pass animate: false to every static asset. However, we believe that this is a sensible default and lots of projects could benefit from it. All it takes is to verify if there is only one frame to be shown, and if that's the case we assume animate: false.
Hello folks.
At the company I work for we use lottie files for everything, animations, icons and static "images". We noticed for the case when the lottie is static there is still an animation running, which hurts performance overtime if we consider an app with lots of these. Also, it makes tests harder as there will be always frames to be pumped.
The solution is simple. All you need is to pass
animate: false
to every static asset. However, we believe that this is a sensible default and lots of projects could benefit from it. All it takes is to verify if there is only one frame to be shown, and if that's the case we assumeanimate: false
.Before
https://user-images.githubusercontent.com/7662016/218285152-31384d2e-31d7-44c9-b248-33b839c811a1.mov
After
https://user-images.githubusercontent.com/7662016/218285155-2b31122a-fe9f-43c5-9586-329be99e8393.mov