Baseflow / LottieXamarin

Render After Effects animations natively on Android, iOS, MacOS and TvOS for Xamarin
https://baseflow.com
Apache License 2.0
1.22k stars 261 forks source link

Animations slow down after few minutes #327

Closed prok155 closed 3 years ago

prok155 commented 3 years ago

🐛 Bug Report

My app contains 8 diffrent lottie files. When I use my app for more than 3-4 minutes and I navigate several times to pages with AnimationView, the animations slow down, like there was memory leak or AnimationViews from prevoius pages still exist in background. My animation view definition is:

<forms:AnimationView x:Name="animationView" RepeatMode="Infinite" Grid.Column="1" CacheComposition="False" Grid.Row="0" Animation="crown.json" AutoPlay="True"/>

Here is my animation 46320-crown (1).zip

Expected behavior

Animations don't slow down.

Reproduction steps

  1. Create animation view as in the example.
  2. Create some pages with AnimationView and navigate between them.
  3. After navigate to 15-20 pages you will see that performance of AnimationView decreased significantly. AnimationView is much slower than when you launched an app.

Configuration

Version: 4.0.9

Platform: