Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Memory consuming] Dotlottie uses too much memory despite its smaller size compared to json #32

Open
hoansgithub opened this issue Aug 16, 2024 · 3 comments

Comments

@hoansgithub
Copy link

JSON file (1.2MB):
image

and the .lottie(848kb) :
image

I'm using Swiftui for development, The .lottie file saved 30% of the app size but it seems too laggy on launch and presentation

@samuelOsborne
Copy link
Member

hi @hoansgithub would you be able to share the file?

@samuelOsborne
Copy link
Member

In the meantime, to reduce memory and improve fps please try the following options:

  • Disabling frame interpolation: config: AnimationConfig(useFrameInterpolation: false)
  • Reducing the default calculated width and height, this will use a lower resolution image for the animation but can be adjusted to not be noticable whilst drastically improving performance: config: AnimationConfig(width: X, height: X)

@hoansgithub
Copy link
Author

thanks @samuelOsborne for your tips, here is the file and I hope this helps!
ob1.lottie.zip

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants