ericwlange/AndroidJSCore

Optimizing library

Closed this issue · 2 comments

Hi, thank a lot for AndroidJSCore. it is so fast. i test it,
but i wanna optimize native library,
because i create a sample and size of my apk is 42 mg, i wanna decrease it.
can i ?

Yes, I am aware of the large size of the library. The issue is that I have to compile the JavaScriptCore library for each architecture (x86, armeabi-v7a, ...). There are 7 ABIs, and the library compresses to about 6MB per ABI. That's where the bloated size is coming from.

I will try to figure out if there is a way to reduce this footprint, but in the meantime, please check out this link: https://realm.io/news/reducing-apk-size-native-libraries/
See the section on "APK Splits". You only need one ABI for any given APK, so you should theoretically be able to get the size down to around 6MB. Let me know if you are able to solve it and I will try to fix it systemically.