Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.

Facebook for Android: Lessons Learned


Published on

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

Published in: Technology, Business
  • Be the first to like this

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