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

Exported app size increases with rive 0.13.0 #367

Open
Amir-P opened this issue Mar 12, 2024 · 8 comments
Open

Exported app size increases with rive 0.13.0 #367

Amir-P opened this issue Mar 12, 2024 · 8 comments
Labels
bug Something isn't working

Comments

@Amir-P
Copy link

Amir-P commented Mar 12, 2024

Description

Upgrading rive from 0.12.4 to 0.13.0, resulted in a huge jump in APK size (about 1.8 MB for android-arm64). Looking at the details I can see this is caused by librive_text.so.

Is there any way to opt-out of text and audio engine?

Device & Versions

Flutter 3.16.9 • channel stable • https://github.com/flutter/flutter.git
Framework • revision 41456452f2 (7 weeks ago) • 2024-01-25 10:06:23 -0800
Engine • revision f40e976bed
Tools • Dart 3.2.6 • DevTools 2.28.5
@Amir-P Amir-P added the bug Something isn't working label Mar 12, 2024
@HayesGordon
Copy link
Contributor

Hi @Amir-P are you setting the ndk-version to:

ndkVersion "25.1.8937393"

See docs here: https://github.com/rive-app/rive-flutter/blob/master/platform_considerations.md#android

@Amir-P
Copy link
Author

Amir-P commented Mar 12, 2024

Hi @Amir-P are you setting the ndk-version to:


ndkVersion "25.1.8937393"

Hi @HayesGordon. Yes, I'm using the exact same version of NDK in my Android project.

@HayesGordon
Copy link
Contributor

Hey @Amir-P, I can confirm what you're seeing. This release is a build-up in preparation for new features that are launching, which are included in those libraries. We'll investigate this size increase and get back to you.

For now I recommend downgrading back to a previous version. Apologies for the inconvenience.

To answer your question about opting out of text + audio, this is something that is already a feature request. But we've not yet planned for this work.

@Fudal
Copy link

Fudal commented Jun 12, 2024

@HayesGordon do you know more about that issue? Will be fixed?

@itsJoKr
Copy link

itsJoKr commented Jun 26, 2024

We are also waiting for the update. The Rive adds an insane 176 MB to our APK size (we need to use APK for specific reasons).

EDIT: Actually this was without specific ndk version. With it it's 26 MB increase which is still a lot but more reasonable.

@HayesGordon
Copy link
Contributor

@itsJoKr could you share a sample project that reproduces this. And provide more information on your build environment and which version of Flutter you're using.

In our testing librive_text.so is around ~1.3 mb. Which accounts for the majority of the size of adding the Rive package.

@Amir-P can you confirm if you're still seeing the big jump. On our side going from version 0.12.0 to 0.13.7 is around 0.4mb increase.

@Amir-P
Copy link
Author

Amir-P commented Jun 29, 2024

@HayesGordon I still see an increase in APK size. Here's is the exact numbers for fat APK with different rive versions:

Without rive: 38.3MB
0.9.1: 38.8MB
0.12.0: 42.9MB
0.13.7: 44.7MB

As you can see depending on version 0.9.1 adds 0.5MB in total but just upgrading from 0.9.1 to 0.13.7 adds about 5.9MB!

@HannesGitH
Copy link

duplicate of #274 ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

5 participants