Facebook on Android
DroidCon London 2013
Why we sucked
2009 – Wrap the Web

2012 – Go Native fast
Why we still suck have problems
Since Jan 2013:
Per user, per day:
Photos posted up
20%
Messages up 33%
Time spent up 25%
...
How can we not?

Emerging markets
40% of users still on Gingerbread or earlier
8 million users per day on Froyo
40% of use...
What we’ve achieved

Since January 2013:
20-30 new features per month
Crashes per user down 30%
APK size flat
Data usage f...
Do’s
Tradeoffs
Don’t

HTML5 doesn’t work
New Zealand is your friend
TechCrunch is not
Java on Dalvik is different
Beware server-side libr...
LinearAlloc

Dalvik loads metadata about each method into a fixed
5 MB buffer
We filled it up (bug fixed in HC)
We hacked ...
What four lines can do

4-line change removed some extra data from logging
Reduced start time for FB Messenger by 10%
Ends...
Bitmaps

Use up mountains of memory
Not garbage collected effectively GB and earlier
Leading cause of OutOfMemoryErrors
Ro...
Bitmaps

Custom reference counting
Custom purgeability
Libjpeg-turbo
Questions?

Tyrone Nicholas
tnicholas@fb.com
Upcoming SlideShare
Loading in …5
×

Facebook for Android: Lessons Learned

251
-1

Published on

Talk given at the DroidCon London 2013 conference by Tyrone Nicholas, an engineer on Facebook's Android team.

Published in: Technology, Business
1 Comment
0 Likes
Statistics
Notes
  • Be the first to like this

No Downloads
Views
Total Views
251
On Slideshare
0
From Embeds
0
Number of Embeds
0
Actions
Shares
0
Downloads
4
Comments
1
Likes
0
Embeds 0
No embeds

No notes for slide

Facebook for Android: Lessons Learned

  1. 1. Facebook on Android DroidCon London 2013
  2. 2. Why we sucked 2009 – Wrap the Web 2012 – Go Native fast
  3. 3. Why we still suck have problems Since Jan 2013: Per user, per day: Photos posted up 20% Messages up 33% Time spent up 25% • 360 million users every month • 200 million every day • Feature surpass desktop web Photo uploads quadrupled
  4. 4. How can we not? 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
  5. 5. What we’ve achieved Since January 2013: 20-30 new features per month Crashes per user down 30% APK size flat Data usage flat
  6. 6. Do’s
  7. 7. Tradeoffs
  8. 8. Don’t 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
  9. 9. LinearAlloc 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
  10. 10. What four lines can do 4-line change removed some extra data from logging Reduced start time for FB Messenger by 10% Ends up saving a year every day!
  11. 11. Bitmaps Use up mountains of memory Not garbage collected effectively GB and earlier Leading cause of OutOfMemoryErrors Rotating, resizing etc, loses purgeability
  12. 12. Bitmaps Custom reference counting Custom purgeability Libjpeg-turbo
  13. 13. Questions? Tyrone Nicholas tnicholas@fb.com
  1. A particular slide catching your eye?

    Clipping is a handy way to collect important slides you want to go back to later.

×