-
-
Notifications
You must be signed in to change notification settings - Fork 3.2k
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
Improve and shrink resources #1603
Comments
Go for it. But remember that we should make our png files compatible with fdroid reproducable build. |
Did you have problems with PNG files? F-Droid's docs say, thee shouldn't be a problem:
|
ok |
@TobiGr I took a look at the project with Android Studio. I opened 2 PR's (#1625, TeamNewPipe/NewPipeExtractor#100). maybe someone of you will check it out :) |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. |
I'm trying to solve section 1, but I have a question regarding this statement:
Can anybody clarify what would those cases be? |
I took a look at the resources and I think that there is potential to minimize NewPipe's size further.
1. Remove duplicate resource strings
In main/res/values/strings.xml you will find several identical strings/values with different names:
play_btn_text
,view
list_thumbnail_view_description
,detail_thumbnail_view_description
controls_popup_title
,settings_category_popup_title
general_error
,msg_error
downloads
,downloads_title
play_audio
,audio
title_activity_history
,action_history
app_name
,preferred_open_action_share_menu_title
download
,download_dialog_title
,settings_category_downloads_title
settings
,action_settings
action_about
,tab_about
By removing at least one duplicate occurrence, we'd not only reduce the effort it needs to translate all parts of the app but also the APK size. In some cases it makes sense to not remove the whole string and its value, but replace the value with a reference to another string:
2. Remove unused strings
There are several unused strings which we should consider to remove. Unfortunately, Android Studio didn't do a good job while searching for unused resources and removed various required strings. For this reason, I wrote a small programme which is more reliable in finding unused strings. Nevertheless we should discuss what to do with strings which are likely to be used in the future. (e.g everything about TOR).
3. Optimize drawables
Our images need quite much memory. We should use vector graphics instead of PNGs (see #1199 for more info). There were some attempts to do this, but they got rejected. Until this is done, we can minimize the images manually or via ImgBot.
But before I dig a bit deeper in the optimization, I'd like to hear the common opinion on this. @theScrabi @wb9688 @mauriciocolli @karyogamy
The text was updated successfully, but these errors were encountered: