Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Get your app in shape

Avatar for Carlos Sessa Carlos Sessa
September 02, 2015

Get your app in shape

Presentation created for Silicon Valley Mobile Dev & Design Meetup.

This talk is about overcoming certain challenges with the Groupon Android app, highlighting specific tools and patterns he’s found which we hope are applicable to your teams as well.

Avatar for Carlos Sessa

Carlos Sessa

September 02, 2015

Other Decks in Technology

Transcript

  1. CARLOS SESSA Working on mobile for 5+ years Author of

    50 Android Hacks Android Engineering Manager Not in shape
  2. THE CONVERSION FUNNEL Conversion funnel is a technical term used

    in e-commerce operations to describe the track a consumer takes through an Internet advertising or search system, navigating an e-commerce website and finally converting to a sale. The metaphor of a funnel is used to describe the decrease in numbers that occurs at each step of the process. “ https://en.wikipedia.org/wiki/Conversion_funnel
  3. GOALS • Define what app startup is • Create graph

    to track progress • Understand what is taking time • …
  4. APP STARTUP DEFINED AS 1. Clicking on the app icon

    2. Reach the Carousel with all images shown
  5. IMPLEMENTATION • Application and activities are measured separate • Added

    load callback to Picasso to detect when all visible images are loaded • Graphs for production data • Graphs for a small set of devices
  6. 4.6 5.3 5.9 6.5 Feb 10 Feb 25 Mar 12

    Mar 27 Apr 11 Apr 26 May 11 May 26 Jun 10 Jun 25 15.1 15.2 15.3 15.4 APP STARTUP TIME
  7. ROBOGUICE • Upgraded to RG 3.x (annotation processing) • Replaced

    RG’s • @InjectView => Butterknife • @InjectResource => VitaminSaber • @InjectExtra => Dart • Pruned RG (v 4.x) • Use LazyInject
  8. REQUEST EXACT IMAGES Picasso has 2 caches • Disk cache

    for http • Memory cache for transformed images If your endpoint doesn’t offer custom size • Waste of memory • Performance hit of transformations
  9. DISABLE FEATURE FOR LOW END • Use Facebook’s Device Year

    Class • Bitmap 565 for devices older than 2012.
  10. ORMLITE GRADLE PLUGIN • Ormlite uses a command line tool

    to build a config file. • Modifying the file was painful. • Open Source https://github.com/stephanenicolas/ormlite-android-gradle-plugin
  11. REMOVE THE SPLASH • Make Splash the background of Carousel

    • Based on Cyril Mottier’s article: Android App Launching Made Gorgeous http://cyrilmottier.com/2013/01/23/android-app-launching-made-gorgeous/
  12. DB REARCHITECTURE • Smaller deal objects for the carousel •

    Reduced the length of relations solving the m+1 queries
  13. SHRINK RESOURCES android { ... buildTypes { debug { shrinkResources

    true ... } } } $ ./gradlew clean assembleDebug --info | grep "Skipped unused resource"