Proprietary + Con¯¬¾dential Airbnb - HeadSpin studies/Airbnb/Airbnb...¢ ...

download Proprietary + Con¯¬¾dential Airbnb - HeadSpin studies/Airbnb/Airbnb...¢  2020-03-09¢  Proprietary +

of 33

  • date post

    16-Jul-2020
  • Category

    Documents

  • view

    29
  • download

    3

Embed Size (px)

Transcript of Proprietary + Con¯¬¾dential Airbnb - HeadSpin studies/Airbnb/Airbnb...¢ ...

  • Proprietary + Confidential

    App performance report Powered by HeadSpin

    Airbnb

    https://www.headspin.io/

  • Proprietary + Confidential

    Device class Budget Moto E2 like OS version: 5

    New York AT&T

  • Proprietary + ConfidentialProprietary + Confidential

    App Startup

  • Proprietary + ConfidentialProprietary + ConfidentialYour app takes ~16s before a user can interact (TTI)

    Low end Mid Tier High end

    Slowest API

    https://api.airbnb.com/v2/logins?client_id=3 092nxybyb0otqw18e8nh5nty&locale=en-U S&currency=USD

    Slowest Download

    https://a0.muscache.com/pictures/f759fb5d -0fd7-4f80-b1a2-23a1915298f4.jpg

    Fixing these issues could improve your TTI by 2,600 ms

    Client side

    View in HeadSpin Console

    https://api.airbnb.com/v2/logins?client_id=3092nxybyb0otqw18e8nh5nty&locale=en-US&currency=USD https://api.airbnb.com/v2/logins?client_id=3092nxybyb0otqw18e8nh5nty&locale=en-US&currency=USD https://api.airbnb.com/v2/logins?client_id=3092nxybyb0otqw18e8nh5nty&locale=en-US&currency=USD https://a0.muscache.com/pictures/f759fb5d-0fd7-4f80-b1a2-23a1915298f4.jpg https://a0.muscache.com/pictures/f759fb5d-0fd7-4f80-b1a2-23a1915298f4.jpg https://ui-dev.headspin.io/sessions/b8bc9df0-c0c4-11e8-a277-02736a1e8d7a/waterfall

  • Proprietary + ConfidentialProprietary + ConfidentialYour app takes ~16s before a user can interact (TTI)

    Low end Mid Tier High end

    Eliminate the serial loading of FB SDK to save 5.3 seconds of TTI.

    Load FB SDK in parallel and then show the FB login screen later with other login options.

    This is with a user that has no FB account

    Fixing these issues could improve your TTI by 2,600 ms

    Client side

    View in HeadSpin Console

    https://ui-dev.headspin.io/sessions/b8bc9df0-c0c4-11e8-a277-02736a1e8d7a/waterfall

  • Proprietary + ConfidentialProprietary + ConfidentialHow Airbnb compares to peers on Time To Interact Client side

    Rank App TTI

    1 Trip (Gogobot) 2,900

    2 TripAdvisor 3,200

    3 Vacationrentals 4,530

    4 Booking.com 8,000

    5 Priceline 9,060

    6 Hotels.com 9,420

    7 Expedia 16,000

    8 Airbnb 16,280

    9 HotelTonight 19,680

    Rank App TTI

    1 Trip (Gogobot) 1,160

    2 Vacationrentals 1,750

    3 Priceline 3,200

    4 Airbnb 3,500

    5 TripAdvisor 4,800

    6 Booking.com 6,600

    7 Hotels.com 6,840

    8 Expedia 9,100

    9 HotelTonight 13,520

    Rank App TTI

    1 Trip (Gogobot) 800

    2 Vacationrentals 800

    3 Booking.com 2,600

    4 Priceline 3,200

    5 Airbnb 3,800

    6 TripAdvisor 4,250

    7 Hotels.com 6,140

    8 Expedia 7,300

    9 HotelTonight 14,040

    Budget Mid Range High End

    Focus on improving performance on budget and mid range devices (80% market share)

  • Proprietary + ConfidentialProprietary + ConfidentialYour app takes 3.7s for a cold startup 1.2 higher than the max recommended time

    Top issues causing slowdowns

    UI Blocked Method

    478 ms ExopackageApplication.onCreate

    416 ms LoginLandingFragment.onCreateView

    Hung CPU methods Hung methods make the UI lag and become unresponsive to the user for longer than 32ms. Methods reported here are doing so because they are using the CPU during this time.

    Hot methods A hot method takes more than 100ms of total app CPU time to execute all its calls.

    Total CPU Time

    Calls Method

    661 ms 1164 I18nModule.fieldNameToString

    Dependencies Sometimes dependencies you include in your app may affect performance. Below are the ones that are significantly impacting performance.

    CPU Time SDK Name

    638 ms Threat Metrix

    Client side server

    View in HeadSpin Console

    https://nimble.app/my_apps/com.airbnb.android?a=aca06706-f118-4f79-9e5a-8b881394829e#summary

  • Proprietary + ConfidentialProprietary + Confidential

    App Login Time

  • Proprietary + ConfidentialProprietary + Confidential

    Optimize Slow App Login Time

    App Login time is ~ 32 seconds! This is due to several factors:

    1. Several Slow Airbnb API Requests a. Example 1 has ~ 2 seconds of Time to First Byte b. Example 2 has ~ 780 ms of Time to First Byte c. Multiple requests to API each with Time to First Byte of ~ 600ms d. Fixing these will save ~ 3.5 seconds

    2. Slow Googleapis.com and GoogleAdServices.com API requests a. These 8 API calls made during login flow adding 12 seconds of delay

    3. Multiple CDN Calls (muscache.com) adds ~ 4 seconds

    https://api.airbnb.com/v2/logins?client_id=3092nxybyb0otqw18e8nh5nty&locale=en-US&currency=USD http://null https://api.airbnb.com/v2/accounts/me?client_id=3092nxybyb0otqw18e8nh5nty&locale=en-US&currency=USD

  • Proprietary + ConfidentialProprietary + Confidential

    APK size

  • Proprietary + ConfidentialProprietary + Confidential

    Reducing your apk size increases the likelihood users will immediately open your app

    Given your app is 82.86 Mb, users on..

    .. WiFi (5 Mbps) will wait 121.6

    .. 3G (1.6 Mbps) will wait 251.4

    .. 2G (150 Kbps) will wait +8 minutes (timed out)

    Case study published on Medium showed every 6 MB increase to an APK’s size decreases install conversion by 1%.

    https://medium.com/googleplaydev/shrinking-apks-growing-installs-5d3fcba23ce2

  • Proprietary + ConfidentialProprietary + Confidential

    You can reduce your APK size from 82.86 MB to 21.85 MB

    82.86

    Current APK size

    21.85

    *Estimated APK size

    24.89

    35.01

    1.11

    Optimize config files

    Proguard

    Images to webp

    You can benefit from a smaller apk size by publishing your app with App bundles

    More tips on reducing your reducing your APK size

    Large files (>0.10 MB): classes.dex (2.69 MB) classes2.dex (2.56 MB) resources.arsc (2.35 MB) res/drawable-xxhdpi-v4/loading_background.jpg (0.75 MB) com/jumio/nv/mrz/environment/mrz_mobile/dictionaries/surname (0.57 MB) res/raw/livenessmodel (0.46 MB) res/raw/model (0.46 MB) META-INF/CERT.SF (0.35 MB) META-INF/MANIFEST.MF (0.35 MB) res/raw/idcardmodel (0.24 MB) res/drawable-land-nodpi-v4/empty_messages.jpg (0.21 MB) res/drawable-nodpi-v4/deposit_message_modal.jpg (0.21 MB) res/drawable-xxhdpi-v4/n2_lux_background_gradient.png (0.19 MB) res/drawable-land-nodpi-v4/whyhost1.jpg (0.18 MB) res/drawable-nodpi-v4/group_payment_message_modal.jpg (0.17 MB) res/drawable-land-nodpi-v4/whyhost3.jpg (0.17 MB) res/drawable-land-nodpi-v4/whyhost4.jpg (0.16 MB) res/drawable-nodpi-v4/whyhost1.jpg (0.16 MB) res/drawable-land-nodpi-v4/whyhost2.jpg (0.15 MB) res/drawable-nodpi-v4/whyhost2.jpg (0.15 MB) res/drawable-nodpi-v4/empty_messages.jpg (0.15 MB) res/drawable-nodpi-v4/whyhost4.jpg (0.13 MB) res/drawable-nodpi-v4/whyhost3.jpg (0.11 MB) assets/drawable-mdpi/apps_cityhostsguest_images_nuxhomes.jpg (0.1 MB)

    *Please note that these numbers are just estimates, as we do not have access to your codebase.

    https://developer.android.com/platform/technology/app-bundle/ https://developer.android.com/topic/performance/reduce-apk-size

  • Proprietary + ConfidentialProprietary + Confidential

    AirBNB Method Count is 460,453 > 65,536 limit

  • Proprietary + ConfidentialProprietary + Confidential

    Battery usage

  • Proprietary + ConfidentialProprietary + Confidential

    Merge network requests to reduce radio wakeups

    Off

    Dormant

    Send

    Snd/Rcv Requests that your app makes to the network are a major cause of battery drain because they turn on the power-hungry mobile or Wi-Fi radios.

    To make your app more battery efficient, we recommend you merge multiple network requests into fewer ones where it makes sense to limit turning on the radio periodically.

    AirBNB.com app consumed 4% battery power over 10 mins of use with min screen brightness when tested on a Samsung S8.

  • Proprietary + ConfidentialProprietary + Confidential

    Merge network requests to reduce radio wakeups

    Third Party SDK like branch keeps radio awake. Try to merge these API and CDN calls

    Third Party SDK like branch keeps radio awake. Merge these API and CDN calls.

    Examples: Request 1 and Request 2 can be potentially merged.

    Convert JPEG to WEBP for faster downloads.

    Reuse CDN connections to prevent new TCP/TLS connections from waking up Radio. About 33% of CDN connections are new.

    https://api.airbnb.com/v2/accounts/me?client_id=3092nxybyb0otqw18e8nh5nty&locale=en-US&currency=USD https://api.airbnb.com/v2/accounts/me?client_id=3092nxybyb0otqw18e8nh5nty&locale=en-US&currency=USD

  • Proprietary + ConfidentialProprietary + Confidential

    Progressive loading

  • Proprietary + ConfidentialProprietary + Confidential

    We recommend using Volley to handle your Http requests. You can use it in addition to Okhttp. Volley offers the following benefits:

    ● Automatic scheduling of network requests.

    ● Multiple concurrent network connections.

    ● Transparent disk and memory response caching with standard HTTP cache coherence.

    ● Support for request prioritization.

    ● Cancellation request API. You can cancel