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
60
A journey to smaller apk size
Dmytro Khmelenko
March 07, 2018
Tweet
Share
More Decks by Dmytro Khmelenko
See All by Dmytro Khmelenko
Securing Python Web Applications
dkhmelenko
0
20
Best of login experience
dkhmelenko
0
110
Best of sign in experience @ Droidcon Lisbon
dkhmelenko
0
80
Red or Green? Let us test
dkhmelenko
0
43
A journey to smaller APK size
dkhmelenko
1
120
How Git helps us with localization
dkhmelenko
0
97
Dagger.Android module
dkhmelenko
0
64
MVVM vs. MVP
dkhmelenko
0
47
Unit testing
dkhmelenko
0
39
Other Decks in Technology
See All in Technology
ハッキングの世界に迫る~攻撃者の思考で考えるセキュリティ~
nomizone
13
5k
MC906491 を見据えた Microsoft Entra Connect アップグレード対応
tamaiyutaro
1
520
プロセス改善による品質向上事例
tomasagi
2
2.2k
TAMとre:Capセキュリティ編 〜拡張脅威検出デモを添えて〜
fujiihda
1
180
バックエンドエンジニアのためのフロントエンド入門 #devsumiC
panda_program
16
7k
第13回 Data-Centric AI勉強会, 画像認識におけるData-centric AI
ksaito_osx
0
370
モノレポ開発のエラー、誰が見る?Datadog で実現する適切なトリアージとエスカレーション
biwashi
6
790
スタートアップ1人目QAエンジニアが QAチームを立ち上げ、“個”からチーム、 そして“組織”に成長するまで / How to set up QA team at reiwatravel
mii3king
2
1.3k
エンジニアの育成を支える爆速フィードバック文化
sansantech
PRO
3
990
『AWS Distinguished Engineerに学ぶ リトライの技術』 #ARC403/Marc Brooker on Try again: The tools and techniques behind resilient systems
quiver
0
140
開発組織のための セキュアコーディング研修の始め方
flatt_security
3
1.4k
Tech Blogを書きやすい環境づくり
lycorptech_jp
PRO
1
230
Featured
See All Featured
Bootstrapping a Software Product
garrettdimon
PRO
306
110k
Rebuilding a faster, lazier Slack
samanthasiow
80
8.8k
GraphQLの誤解/rethinking-graphql
sonatard
68
10k
Distributed Sagas: A Protocol for Coordinating Microservices
caitiem20
330
21k
Why You Should Never Use an ORM
jnunemaker
PRO
55
9.2k
Learning to Love Humans: Emotional Interface Design
aarron
273
40k
Gamification - CAS2011
davidbonilla
80
5.1k
Making Projects Easy
brettharned
116
6k
Being A Developer After 40
akosma
89
590k
How to Ace a Technical Interview
jacobian
276
23k
Measuring & Analyzing Core Web Vitals
bluesmoon
6
240
Making the Leap to Tech Lead
cromwellryan
133
9.1k
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