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 flags SVG assets size #143

Closed
G00fY2 opened this issue Dec 14, 2021 · 4 comments · Fixed by #150
Closed

Reduce flags SVG assets size #143

G00fY2 opened this issue Dec 14, 2021 · 4 comments · Fixed by #150
Labels
enhancement New feature or request

Comments

@G00fY2
Copy link
Contributor

G00fY2 commented Dec 14, 2021

Currently the flag svg drawables (which are only used for 24x24px) images in the country selection view of the validity check are way to large.

Uncompressed file sizes:

Suggested Enhancement

Replace the large assets (ideally all) with a optimized SVG representations. E.g. the Serbian flag over here has the same details but the file has only 72 KB: https://github.com/hampusborgos/country-flags/blob/main/svg/rs.svg

Expected Benefits

Smaller APK size, better memory footprint and performance.

@G00fY2 G00fY2 added the enhancement New feature or request label Dec 14, 2021
@G00fY2 G00fY2 changed the title Reduce flag SVG assets size Reduce flags SVG assets size Dec 14, 2021
@MikeMcC399
Copy link

@G00fY2
I also noticed about the large size of flag_rs.xml when I reported and looked at the crash issue #105 in CovPass 1.12.0. I saw that this issue was resolved in 1.13.2.

In the release/1.13.x branch flag_rs.xml was reduced in size and I'm now seeing 212KB in 1.13.x instead of 1647KB in 1.12.x (or main).

That still seems excessive for use in a thumbnail size display.

(According to https://github.com/Digitaler-Impfnachweis/covpass-android/blob/main/README.md#release-policy-and-branches there may be delays in publishing the released code into the main branch and currently it is lagging behind the version 1.13.3 which has been published to the Google Play Store.)

@G00fY2
Copy link
Contributor Author

G00fY2 commented Dec 14, 2021

It should be way more efficient in size and performance to generate the flags as PNG/WebP drawables, because all the vector paths to draw the emblems are not visibile at this scale. I just run a short test to see the total size of the xxxhdpi folder for all flags in 24x24px PNG -> 218 KB

@oliver-steinbrecher
Copy link

Thanks for raising this. As you already stated we've improved the sizing in release 1.13.2 . There is still room for improvements but it's a matter of priority in comparison to other topics. We're working hard to define the best priorities. Please provide more insights when you experience performance issues with the current app version. Especially share details about your device / setup.

@pucherd
Copy link
Contributor

pucherd commented Jan 30, 2023

Hello @G00fY2, Thank you for your contribution, this will be part of release 1.40.0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants