airbnb / lottie-ios

An iOS library to natively render After Effects vector animations
http://airbnb.io/lottie/
Apache License 2.0
25.76k stars 3.75k forks source link

UICollection scroll issue after migration 2.5.3 to 4.2.0. #2081

Closed Hydralo closed 1 year ago

Hydralo commented 1 year ago

Discussed in https://github.com/airbnb/lottie-ios/discussions/2079

Originally posted by **Hydralo** June 19, 2023 Hello! It may be my fault but I am facing an issue after migrating from 2.5.3 to 4.2.0. I have a collection of images (animated and static) which is scrolling on vertical axis. I've recorded a video from a physical device (iPhone 13), when I am scrolling up and down frame rate dramatically lowers and you can see some animation freezes. This happens only after migration to 4.2.0 and never happens before. I've read some docs, announces and closed issues, so I've figured out that the problem can be connected with new rendering engine and json decoding. So I've tried to build `LottieAnimationView` with configuration `LottieConfiguration(renderingEngine: .mainThread, decodingStrategy: .legacyCodable)` and got no positive changes. While trying to debug I used Profiler and all traces points to Lottie calls, but I don't find it useful enough to figure out what actually causes this behaviour. Moreover, I've builded a standalone project with only collection view and locally placed assets to test cells scrolling with some random set of animations and with the set, I've previously attached. The result is the same. [CollectionTest.zip](https://github.com/airbnb/lottie-ios/files/11801812/CollectionTest.zip) https://github.com/airbnb/lottie-ios/assets/20144920/ff69bf2e-2783-4c04-a3b9-0a6a8fff3e01 [assets.zip](https://github.com/airbnb/lottie-ios/files/11788404/assets.zip)
calda commented 1 year ago

This is best suited as a discussion rather than an issue. Closing in favor of https://github.com/airbnb/lottie-ios/discussions/2079.