Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
A journey to smaller apk size
Search
Dmytro Khmelenko
March 07, 2018
Technology
0
54
A journey to smaller apk size
Dmytro Khmelenko
March 07, 2018
Tweet
Share
More Decks by Dmytro Khmelenko
See All by Dmytro Khmelenko
Best of login experience
dkhmelenko
0
110
Best of sign in experience @ Droidcon Lisbon
dkhmelenko
0
60
Red or Green? Let us test
dkhmelenko
0
39
A journey to smaller APK size
dkhmelenko
1
100
How Git helps us with localization
dkhmelenko
0
93
Dagger.Android module
dkhmelenko
0
49
MVVM vs. MVP
dkhmelenko
0
42
Unit testing
dkhmelenko
0
32
RxJava at Freeletics
dkhmelenko
0
76
Other Decks in Technology
See All in Technology
[新卒向け研修資料] テスト文字列に「うんこ」と入れるな(2024年版)
infiniteloop_inc
4
15k
プロトタイピングによる不確実性の低減 / Reducing Uncertainty through Prototyping
ohbarye
5
390
MapLibreとAmazon Location Service
dayjournal
1
160
ExaDB-D dbaascli で出来ること
oracle4engineer
PRO
0
2.1k
Azure Container Apps + Bicep 〜 こんな感じで運用しています
kaz29
2
480
Azureの基本的な権限管理の勉強会
yhana
0
550
AWSに詳しくない人でも始められるコスト最適化ガイド
yuhta28
1
240
アクセス制御にまつわる改善 / Improving access control
itkq
0
540
生産性向上チームの紹介
cybozuinsideout
PRO
1
870
レガシーをぶっ壊せ。AEONで始めるDevRelの話 / Qiita Night 2024-2-22
aeonpeople
3
1.3k
require(ESM)とECMAScript仕様
uhyo
3
710
ワールドカフェI /チューターを改良する / World Café I and Improving the Tutors
ks91
PRO
0
120
Featured
See All Featured
Templates, Plugins, & Blocks: Oh My! Creating the theme that thinks of everything
marktimemedia
19
1.7k
Why You Should Never Use an ORM
jnunemaker
PRO
51
8.6k
Designing with Data
zakiwarfel
96
4.8k
Robots, Beer and Maslow
schacon
PRO
155
7.9k
Building an army of robots
kneath
300
41k
Faster Mobile Websites
deanohume
299
30k
Adopting Sorbet at Scale
ufuk
68
8.6k
YesSQL, Process and Tooling at Scale
rocio
164
13k
Building Flexible Design Systems
yeseniaperezcruz
319
37k
The Language of Interfaces
destraynor
151
23k
Teambox: Starting and Learning
jrom
128
8.4k
A Philosophy of Restraint
colly
197
16k
Transcript
A JOURNEY TO SMALLER APK SIZE Dmytro Khmelenko Software Engineer
7 March 2018
ONCE UPON A TIME… Release APK size is 63 MB
2
ONCE UPON A TIME… Release APK size is 63 MB
3
4 ANALYZE APK
ANALYZE APK 5
RESOURCES OPTIMIZATION 6 ✅ Shrink video files (- 10 MB)
7 Overall bit rate : 3 235 kb/s Bits/(Pixel*Frame) :
0.549 Stream size : 4.77 MiB (94%) File size : 5.3 MB Overall bit rate : 735 kb/s Bits/(Pixel*Frame) : 0.108 Stream size : 963 KiB (81%) File size: : 1.2 MB
RESOURCES OPTIMIZATION 8 ✅ Shrink video files (- 10 MB)
✅ Shrink audio files (- 4 MB)
AUDIO FILES 9 Before: Bit rate : 256 kb/s Channel(s)
: 2 channels Sampling rate : 44.1 kHz File size : 56.4 KB After: Bit rate : 32.0 kb/s Channel(s) : 1 channel Sampling rate : 16.0 kHz File size : 13.7 KB
RESOURCES OPTIMIZATION ✅ Shrink video files (- 10 MB) ✅
Shrink audio files (- 4 MB) ✅ Shrink and optimize drawables (- 25 MB) 10
11 525 KB, .png 75 KB, .jpg
DRAWABLES OPTIMIZATION ✅ Remove unused drawables (Lint, ProGuard) ✅ Support
only hdpi, xhdpi and xxhdpi ✅ Use .jpeg, when possible ✅ Use .webp instead of .png 12
DRAWABLES SIZE hdpi ~ 50 KB xhdpi ~ 100 KB
xxhdpi ~ 150 KB 13
TIME TO REVIEW 14
TIME TO REVIEW 15
LEARNINGS Pay attention to resources Collaborate with designers 16
MEANWHILE 17
WE NEED TO STOP IT 18
IT WORKS 19
FURTHER STEPS • Multiple APK split by screen density •
Multiple APK split by CPU architecture • Automatically check size for every new file 20
RESOURCES • https://developer.android.com/topic/performance/reduce-apk-size.html • https://developer.android.com/google/play/publishing/multiple-apks.html • https://gist.github.com/dkhmelenko/d74dbc6c9907c7a581bde0e1bee5c74b 21
QUESTIONS? @dkhmelenko