Lottie-android: Frame Drop

Created on 22 Feb 2018  Â·  16Comments  Â·  Source: airbnb/lottie-android

@gpeal My animations are dropped frame. Currently I have an onboarding screen in which it has four 4, each with an animation.

*Pixel 1 - Android Oreo
*Lottie 2.5.0
raw.zip.zip

Most helpful comment

@gpeal Mattes and masks are 2-10x faster with 3.0

All 16 comments

@cshalysongoncalves What do you mean by "losing frame"?

@cshalysongoncalves Sorry, I don't understand.

From what just happened to me I guess something changed from lottie:2.5.0-rc1 to lottie:2.5.0 and is causing the same animation to look like is dropping frames.

@nabrozidhs Lottie now respects the framerate set in After Effects instead of trying to render everything at 60fps. I can add an API to force it to try and render at 60fps if you want though.

I don't think it's needed, I'll ping my designer and update my source animations.

I'll let you know if it works!

I did this for LottieUWP. It now has a FrameRate property that by default has the value set inside the json file, but it can be changed by the developer, if wanted.

@gpeal Any news?

I will add this in the next few weeks or will accept a pr sooner.

On Thu, Mar 1, 2018, 3:33 AM Halyson Lima Gonçalves <
[email protected]> wrote:

@gpeal https://github.com/gpeal Any news?

—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/airbnb/lottie-android/issues/647#issuecomment-369564220,
or mute the thread
https://github.com/notifications/unsubscribe-auth/ABP0Yd5mOSXQ9IzWE5rGjbSJNfhHakzEks5tZ9yIgaJpZM4SQHAp
.

Hey,
Running this on Motorola Play Z, and I see a lot of lag/dropped frames in every animation.

Dont think this issue is device specific, but it appears lottie as a library isnt very friendly to phones that are slightly older.

Needs to be lighter as far as I can tell, do you guys have any suggestion?

@Akshshr I think any dropped frames regression in 2.5.0 is actually due to it following the framerate specified in After Effects rather than trying to always run at 60fps. I may revert this behavior change, however.

Lottie was written with performance in mind. However, many performance issues can be solved by re-working parts of your animation, particularly if they have many or large mattes or masks. There are some suggestions here. If there are opportunities to improve lottie itself, feel free to open a pull request.

@gpeal Hey, thanks for that! looks like it was my test device that was causing some trouble, phone just needed a restart!
Thanks for the help anyway

@gpeal Im having a similar issue. On android, when displaying more than 4 lotties at the same time, there is a massive fps drop on the app that I don't meet on iOS with same animation. Ive got not warning at all (I benchmarked the animation on the lottie app preview), the animation was designed by a designer that followed what need to be done to have a smooth animation. Btw, with one or two animations its perfectly smooth.
I know my test device is not a S9, its a honor 9 , but it runs a lot of games that are much more greedy if I may say than 4 lotties animation.

@Umar3x please try 3.0.0-beta1

@gpeal

Can't do that, cause I'm on Xamarin .NET and 3.0.0-beta1 not available on this package. Just one question, what could cause that in actual version, if may be fixed in 3.0.0-beta1 ? I have to display 10 lotties animation playing at the same time, still very laggy on Android, no prob at all on iOS.

@gpeal Mattes and masks are 2-10x faster with 3.0

Was this page helpful?
0 / 5 - 0 ratings

Related issues

11hhlin1 picture 11hhlin1  Â·  3Comments

leleliu008 picture leleliu008  Â·  4Comments

Anmolk22 picture Anmolk22  Â·  3Comments

hkchakladar picture hkchakladar  Â·  3Comments

mateusgrb picture mateusgrb  Â·  5Comments