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
Developing for Android
Search
Sponsored
·
Your Podcast. Everywhere. Effortlessly.
Share. Educate. Inspire. Entertain. You do you. We'll handle the rest.
→
Realm
November 30, 2015
Programming
2
19k
Developing for Android
Presented by Chet Haase and Romain Guy at Bay Area Android Developer Group on November 30, 2015
Realm
November 30, 2015
Tweet
Share
More Decks by Realm
See All by Realm
WWDC 2017 Review
realm
0
2.1k
Xcode shortcuts
realm
0
4.7k
Self Branding with GitHub
realm
0
4.3k
Realm Mobile Platform overview and demo
realm
0
2.1k
Realm advanced topics and demo
realm
0
2k
Realm introduction Seoul meetup 10
realm
0
2.2k
Stuart Hall: How I got 2.3 Million App Downloads
realm
0
1.9k
James Majors: What the Swiftly Func?
realm
1
4.3k
Simina Pasat: Continuous everything for iOS apps
realm
0
650
Other Decks in Programming
See All in Programming
Vibe Coding - AI 驅動的軟體開發
mickyp100
0
170
2026年 エンジニアリング自己学習法
yumechi
0
130
Oxlint JS plugins
kazupon
1
660
フルサイクルエンジニアリングをAI Agentで全自動化したい 〜構想と現在地〜
kamina_zzz
0
400
Apache Iceberg V3 and migration to V3
tomtanaka
0
150
Vibe codingでおすすめの言語と開発手法
uyuki234
0
220
Basic Architectures
denyspoltorak
0
660
AIと一緒にレガシーに向き合ってみた
nyafunta9858
0
170
AIエージェントのキホンから学ぶ「エージェンティックコーディング」実践入門
masahiro_nishimi
3
300
CSC307 Lecture 04
javiergs
PRO
0
660
MUSUBIXとは
nahisaho
0
130
AIによる高速開発をどう制御するか? ガードレール設置で開発速度と品質を両立させたチームの事例
tonkotsuboy_com
6
1.9k
Featured
See All Featured
How To Stay Up To Date on Web Technology
chriscoyier
791
250k
Mozcon NYC 2025: Stop Losing SEO Traffic
samtorres
0
140
The Director’s Chair: Orchestrating AI for Truly Effective Learning
tmiket
1
96
JAMstack: Web Apps at Ludicrous Speed - All Things Open 2022
reverentgeek
1
320
GitHub's CSS Performance
jonrohan
1032
470k
Jamie Indigo - Trashchat’s Guide to Black Boxes: Technical SEO Tactics for LLMs
techseoconnect
PRO
0
55
Evolution of real-time – Irina Nazarova, EuRuKo, 2024
irinanazarova
9
1.2k
Lightning Talk: Beautiful Slides for Beginners
inesmontani
PRO
1
430
Chrome DevTools: State of the Union 2024 - Debugging React & Beyond
addyosmani
10
1.1k
Side Projects
sachag
455
43k
AI Search: Implications for SEO and How to Move Forward - #ShenzhenSEOConference
aleyda
1
1.1k
How to optimise 3,500 product descriptions for ecommerce in one day using ChatGPT
katarinadahlin
PRO
0
3.4k
Transcript
Romain Guy Chet Haase Developing for Android +RomainGuy, @romainguy +ChetHaase,
@chethaase Development for Developers by Developers Managers
Developing for Android medium.com @chethaase
Why is Mobile Development So Difficult?
• Limited • Shared Memory
• Slower than desktop & server • Throttled CPU Much
• [See previous slide] • Texture uploads are expensive •
Fill rate vs. density GPU
• Larger application heaps lead to • More task thrashing
• Slower allocations • Slower collections • More garbage collector activity Memory == Performance
Allocate Enumerate Mark Collect
Allocate Enumerate Mark Collect Pause Pause Dalvik
Allocate Enumerate Mark Collect Pause ART
Slot Available Slot Freed
Slot Available Oh Noze! Slot Freed Pause GC_FOR_ALLOC
ART
• Your device is faster than your users’ • And
has more memory • Moore’s Law does not always apply Low-End Devices
• You have 16ms per frame • To do everything
• Consistency is good Smooth Frame Rate
• Dalvik vs. ART • Language != runtime != hardware
Runtime
Language != Platform Java programming language Runtime Hardware
Server-Land Moving, compacting collector CPU: Memory: very very fast Basically
∞ Java programming language Server runtime Server
Android No compaction Idle compaction CPU: wayyyy slower Memory: 512MB
- 2GB Java programming language ART Mobile Dalvik
• Android is single-threaded UI system • (mostly) • Eliminate
unnecessary work on UI thread UI Thread
• Storage performance varies • Storage size varies • So
apk size matters Storage
• Your network is faster than your users’ • And
maybe cheaper, too Network
• Every Device is a Village • Tragedy of the
Commons And Finally
Language & libraries
• Don’t use serialization • Use Android data structures •
Be mindful of XML and JSON usage • Avoid JNI • Primitives vs boxed primitives • Avoid reflection • Be careful with finalizers Know Your Language
Networking
• Don’t over-sync • Allow delayed downloading • Google Cloud
Messaging • GCM Network Manager (Job Scheduler) • Don’t poll • Only sync what you need to Syncing
• Don’t assume anything about the network • Develop for
low-end networks • And test for them, too Network quality
• Design back-end APIs for mobile usage patterns • Minimize
and compress data Data & protocols
Storage
• Don’t hard-code file paths • Persist relative paths only
• Use storage cache for temp files • Avoid SQLite for simple needs • Avoid using too many databases • Let user choose content storage location Random stuff about storage
Romain Guy Chet Haase Developing for Android +RomainGuy, @romainguy +ChetHaase,
@chethaase Development for Developers by Developers Q & A