Replies: 1 comment
-
Hi @iway1, If your Lottie file is a large JSON, chances are that is the prevalent issue. By default, metro loads certain file types on the JS side, including JSON files, and it needs to be sent over the bridge for us to be able to use it, and that causes an unneeded overhead and slows things down. While we are waiting for the new architecture to become more mainstream so we can see if that tech can help us alleviate the problem, we have introduced dotLottie support in the meantime. dotLottie is a newer, smaller format type, and since it is not one of the file formats that Metro auto-loads, we have set it up in a way for the asset to be loaded on the native side, which should alleviate any sort of performance penalties. You can read more about it here and here. If you already have JSON files, you can also switch them to dotLottie quite easily with tools such as this |
Beta Was this translation helpful? Give feedback.
-
I have some lottie animations who's initial render is slow and lags the UI of the application for about half a second. I'm not sure what the root cause is.
Does anyone know what the most likely performance issues are in Lottie? File size? Number of distinct elements?
Beta Was this translation helpful? Give feedback.
All reactions