Waboodoo / HTTP-Shortcuts

Android app to create home screen shortcuts that trigger arbitrary HTTP requests
https://http-shortcuts.rmy.ch
MIT License
1.17k stars 113 forks source link

3.16.0 is 3x the size #436

Closed opk12 closed 3 months ago

opk12 commented 3 months ago

The builds for version 3.16.0 on GitHub Releases and F-droid are thrice the size of the previous releases. Is that expected? I don't see anything related in the changelog.

Waboodoo commented 3 months ago

Hi, thanks for bringing this to my attention. I was not aware of the size increase, and it is quite a drastic one.

I dug into it and found out that it is related to the fact that I increased the minimum supported SDK from 21 to 23, i.e., it's related to the "Android 5 is no longer supported." entry in the changelog. I was not aware of this, but apparently this also changes the default behavior of how the library binaries in the APK are compressed (specificially it affects this setting). This is supposedly a performance improvement, but it comes with the drawback that the APKs are much larger due to the fact that some of the largest files contained in them are no longer compressed.

I will switch this back to the old behavior for the next release.

Waboodoo commented 3 months ago

Version 3.17.0 is now being released. The size of the APKs is back to the old, much more reasonable value.

opk12 commented 3 months ago

Thank you very much for the quick fix!

I am not an Android dev and do not know how Android works, but after reading the article, I wonder for curiosity - did the unexpected change also subtract a few MB from the total occupied size on the phone (apk file + installed copy)?

I'm asking because

I suppose(?) that the libraries occupy

Sorry if I got it wrong

Waboodoo commented 3 months ago

I'm no expert on this either, but the way I understand this, it's a trade-off between having a small APK (because the binaries get compressed) and having better performance at runtime, because the libraries don't need to be copied or uncompressed.

This only affects users who install the APKs manually and users who get the app from F-Droid. For neither of those groups do I have any numbers on how many users are affected, and I also don't know what the preferences of these users are and what kind of performance gains could be had. As such, I can't really make an informed decision about whether this parameter should be set to true or false. In the long run, the better option here seems to be to use the default value, which means larger APKs, but it also seems rather minor to me so I don't want to make this decision right now.

opk12 commented 3 months ago

Ah yes, users probably do not know this and would be scared of the big apk size