Upgrade to PRO for Only $50/Year—Limited-Time Offer! 🔥
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
Developing for Android
Search
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
640
Other Decks in Programming
See All in Programming
まだ間に合う!Claude Code元年をふりかえる
nogu66
5
840
エディターってAIで操作できるんだぜ
kis9a
0
730
チームをチームにするEM
hitode909
0
340
TestingOsaka6_Ozono
o3
0
160
SwiftUIで本格音ゲー実装してみた
hypebeans
0
390
これだけで丸わかり!LangChain v1.0 アップデートまとめ
os1ma
6
1.9k
Cap'n Webについて
yusukebe
0
130
AI時代を生き抜く 新卒エンジニアの生きる道
coconala_engineer
1
230
Go コードベースの構成と AI コンテキスト定義
andpad
0
130
S3 VectorsとStrands Agentsを利用したAgentic RAGシステムの構築
tosuri13
6
310
WebRTC と Rust と8K 60fps
tnoho
2
2k
C-Shared Buildで突破するAI Agent バックテストの壁
po3rin
0
390
Featured
See All Featured
Reflections from 52 weeks, 52 projects
jeffersonlam
355
21k
Fashionably flexible responsive web design (full day workshop)
malarkey
407
66k
Optimising Largest Contentful Paint
csswizardry
37
3.5k
Side Projects
sachag
455
43k
Intergalactic Javascript Robots from Outer Space
tanoku
273
27k
The Language of Interfaces
destraynor
162
25k
How Fast Is Fast Enough? [PerfNow 2025]
tammyeverts
3
390
Making Projects Easy
brettharned
120
6.5k
Building a Modern Day E-commerce SEO Strategy
aleyda
45
8.3k
Let's Do A Bunch of Simple Stuff to Make Websites Faster
chriscoyier
508
140k
The Web Performance Landscape in 2024 [PerfNow 2024]
tammyeverts
12
970
jQuery: Nuts, Bolts and Bling
dougneiner
65
8.3k
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