Lottie 3.2.0
Low memory and CPU overhead.
High memory and CPU overhead
iPhone 11 Pro Max gets physically hot while sitting on a screen with a stock Lottie animation
Memory overhead is ~150-200MB at worst on top of the existing, base memory otherwise
CPU overhead is ~60-80% at worst on top of the existing, base CPU otherwise (doing nothing else in background)
The result is excessively low frame rates when scrolling, in our case, a page view controller.

final class OnboardingPageBlahBlahBlah: OnboardingPage
{
@IBOutlet private var animationContainer: UIView!
private let animationView = AnimationView( animation: Animation.named( "43885-laptop-working" ) )
override func viewDidLoad()
{
super.viewDidLoad()
animationView.frame = animationContainer.bounds
animationContainer.addSubview( animationView )
animationView.loopMode = .loop
animationView.backgroundBehavior = .pauseAndRestore
}
override func viewDidAppear( _ animated: Bool )
{
super.viewDidAppear( animated )
// Workaround bug in Lottie...dispatch to next run loop to ensure animation has loaded
DispatchQueue.main.async
{
self.animationView.play()
}
}
}
@buba447 As I understand this is an open-source project without full time maintenance, a proper fix for performance could be time intensive and not possible in the short term.
Is there a suitable workaround? Maybe a version I can downgrade to while remaining compatible with Swift 5 (and preferably SPM)?
If not, is there anything I can do to help out?
Thanks Brandon!
We also discovered this issue. A temp fix is to use the last known OBJ-C lottie version. in 2.x.x but the downside is that it dosnt support so many AE effects
IIRC buba mentioned the issue had to do with swift structs consuming more memory/CPU than he expected, and that a rewrite of several sections would be necessary.
IMO this library is so useful big companies should sponsor @buba447 to work on it full time, or Apple should should add native support lol