View
163
Download
1
Category
Tags:
Preview:
DESCRIPTION
Talk given at the DroidCon London 2013 conference by Tyrone Nicholas, an engineer on Facebook's Android team.
Citation preview
Facebook on AndroidDroidCon London 2013
2009 – Wrap the Web
2012 – Go Native fast
Why we sucked
Since Jan 2013: Per user, per day:
Photos posted up 20%
Messages up 33%
Time spent up 25%
Photo uploads quadrupled
Why we still suck have problems
• 360 million users every month
• 200 million every day• Feature surpass desktop
web
Emerging markets 40% of users still on Gingerbread or earlier 8 million users per day on Froyo 40% of users using old versions of the app
How can we not?
Since January 2013: 20-30 new features per month Crashes per user down 30% APK size flat Data usage flat
What we’ve achieved
Do’s
Tradeoffs
HTML5 doesn’t work New Zealand is your friend TechCrunch is not Java on Dalvik is different Beware server-side libraries like Guava Purgeable bitmaps don’t help much
Don’t
Dalvik loads metadata about each method into a fixed 5 MB buffer
We filled it up (bug fixed in HC) We hacked into Dalvik’s memory space to
increase this size! Tested across dozens of devices
LinearAlloc
4-line change removed some extra data from logging
Reduced start time for FB Messenger by 10% Ends up saving a year every day!
What four lines can do
Use up mountains of memory Not garbage collected effectively GB and
earlier Leading cause of OutOfMemoryErrors Rotating, resizing etc, loses purgeability
Bitmaps
Custom reference counting Custom purgeability Libjpeg-turbo
Bitmaps
Tyrone Nicholas tnicholas@fb.com
Questions?
Recommended