Since updating to the new lottiefiles/dotLottie-ios package, I have several issues with my app.
- Energy impact is very high when running on a device.
- Transitions are noticeably slower.
- Some animations cause the renderer to crash
I am calling animations from within a View:
DotLottieAnimation(fileName: name, config: AnimationConfig(autoplay: true, loop: true, mode: mode, speed: Float(speedSetting), useFrameInterpolation: true)).view()
I have tried also calling animations from within a UIViewRepresentable:
func makeUIView(context: Context) -> some DotLottieAnimationView {
let view: UIView = UIView(frame: .zero)
let simpleVM = DotLottieAnimation(fileName: animationFileName, config: AnimationConfig(autoplay: true, loop: true))
let loaderView: DotLottieAnimationView = simpleVM.view()
loaderView.translatesAutoresizingMaskIntoConstraints = false
view.addSubview(loaderView)
loaderView.frame = view.bounds
return loaderView
}
While I am able to isolate and avoid certain animations, I haven’t been able to resolve the lagging and high energy impact. I am unable to make updates to my app using this new package until I can resolve these issues. I appreciate any feedback.