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

Reduce app size #4

Open
wants to merge 6 commits into
base: master
Choose a base branch
from
Open

Reduce app size #4

wants to merge 6 commits into from

Conversation

kdrag0n
Copy link

@kdrag0n kdrag0n commented Jul 11, 2020

  • Remove unused class
  • Drop unused libsu components
  • Enable R8 minification and resource shrinking
  • Compress and optimize JPEG list view images

This brings the signed release APK size down from 14 MB to 2 MB, which is much more reasonable for a small and simple benchmark app like this.

kdrag0n added 6 commits July 29, 2020 17:15
This class is never used anywhere in the app, so keeping it is
pointless.
We only use libsu for running simple shell commands that are guaranteed
to be present everywhere; there's no need to include Java I/O interfaces
or full Busybox executables.
There's really no reason to leave these features disabled and lose out
on significant app size improvements, since there's only one method in
the overdraw test that needs special treatment.
There's no reason to include such high-quality images direct from the
original camera, since they'll be downscaled to 100x100 dp before being
rendered anyway. These images are the primary cause of the massive APK
size.

This commit downscales the images to a width of 512 and height
proportional to the original to preserve aspect ratio. jpegoptim has
also been used to strip EXIF metadata and reduce size further by
recompressing the image data at a quality of 80.
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

Successfully merging this pull request may close these issues.

1 participant