react-native-compressed-jsbundle icon indicating copy to clipboard operation
react-native-compressed-jsbundle copied to clipboard

Android support

Open ivanmoskalev opened this issue 3 years ago • 5 comments

ivanmoskalev avatar Sep 18 '21 07:09 ivanmoskalev

I would be interested in this as well :)

tux2nicolae avatar Jun 02 '22 09:06 tux2nicolae

@tux2nicolae Do you have any specific usecase in mind (for example, Android Instant), or are you interested in general case size reduction?

ivanmoskalev avatar Jun 04 '22 07:06 ivanmoskalev

@ivanmoskalev right now we are using your library on IOS for app clips but we would also be interested in being able to use it with Android instant as well. Indeed on android the size limits are a little bit more permissive around 15MB in download size but a react-native app on Android also should ship the JS engine with the application, which increases the app size.

Either way, I would definitely trade the decompression time for even one MB of download size on Android too.

tux2nicolae avatar Jun 08 '22 19:06 tux2nicolae

Great! But I have a feeling that this would need to be shipped as an experimental feature, since, given the wide variety of older android phones out there, the performance could possibly be awful.

Another caveat: I've just started a new job, and things might be a bit hectic atm. You could either: (1) wait for me to become available (can't yet predict when), or, (2) I can help you out if you decide you are interested in coding most of this yourself.

Since the Android support will be marked experimental, I see no harm in doing the most basic implementation first and polishing it later.

ivanmoskalev avatar Jun 08 '22 19:06 ivanmoskalev

You're right, and there is one more aspect to this, on android the size is counted as the download size which is already compressed. I didn't actually measured the real size win if we'll use Brotli for compressing the jsbundle.

tux2nicolae avatar Jun 09 '22 13:06 tux2nicolae