Closed corradocavalli closed 6 years ago
Only by reducing the FPS. The way the animations works is totally bound to the CPU(path calculation, progress and keyframes calculations, etc). There is work that can be done to cache some calculations, but not much.
I tried having this much CPU on a blank app with a gridview and LottieAnimationView, but I got 30% only with 100 animations on screen. It really will depend on the animation. And your CPU ;)
I tried with the preloader animation (from LottieFiles) and with 5 cpu reached 40%. I started checking cpu load after i got a comment on my post by a user that told me that he gived up using the library because of too much cpu and memory pressure. I have a quite powerful machine, but i have to consider the worst situation first. :-)
On 25 Feb 2018, at 10:12, Alexandre Zollinger Chohfi notifications@github.com<mailto:notifications@github.com> wrote:
I tried having this much CPU on a blank app with a gridview and LottieAnimationView, but I got 30% only with 100 animations on screen. It really will depend on the animation. And your CPU ;)
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHubhttps://github.com/azchohfi/LottieUWP/issues/15#issuecomment-368294451, or mute the threadhttps://github.com/notifications/unsubscribe-auth/AFW5Eu9IkRg_VmsCayLvYikW0yi87q6kks5tYSP5gaJpZM4SR8Pl.
Version 2.5.0 (the one on NuGet) removed tons of memory leaks, so that should not be a problem anymore.
Have you tried the latest from MyGet? It should also fix the Speed on XAML.
I'm going to close this for now, since it's a hard thing to track and https://github.com/azchohfi/LottieUWP/commit/b4dc63209805eb2111b6e32053cfffc1c303194b probably helped a lot with CPU/GPU .
Tested now, CPU load went to 40% to less than 2% with 5 animations, super well done!
A simple Lottie Animation uses about 3/4% of CPU increasing the number to 5 even with caching we reach more than 30%. Is there a way to make CPU load smaller?