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

Really high memory usage with idle animations in Android #325

Open
Karn opened this issue Apr 16, 2024 · 1 comment
Open

Really high memory usage with idle animations in Android #325

Karn opened this issue Apr 16, 2024 · 1 comment

Comments

@Karn
Copy link

Karn commented Apr 16, 2024

Description

Using a simple idle animation results in almost double memory usage.

Without animation With animation

Provide a Repro

Attached is a sample project. Comment out RiveAnimation usage in MainActivity to see sample before.

Sample project: rive-sample.zip

Source .riv/.rev file

Borrowed sample from: https://rive.app/community/files/9467-18018-mememoji/

me.riv.zip

Expected behavior

lower memory usage.

Screenshots

Device & Versions (please complete the following information)

  • Device: Android, Oneplus 8
  • SDK Level: API 33

Additional context

@csmartdalton
Copy link
Contributor

Wow! 120 MB is a LOT! 😱

Thank you for the test case. We are just now in the process of making the Rive renderer default on Android & iOS. The currently-default renderer on Android will fill up its cache quickly on an idle animation like this, leading to large memory usage like you're seeing here.

If you enable the pre-release Rive renderer do you see better memory usage? (I don't recommend releasing with the Rive renderer yet, since there are still some devices with issues, but it should give you an idea of where things will land in the near future.) Also note that the Rive renderer currently uses OpenGL on Android. We are actively finishing up the Vulkan implementation, which will also get better memory usage.

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