33
Proprietary + Confidential App performance report Powered by HeadSpin Airbnb

Proprietary + Confidential Airbnb - HeadSpin studies/Airbnb/Airbnb... · 2020-03-09 · Proprietary + Confidential Device class Budget Moto E2 like OS version: 5 New York AT&T

  • Upload
    others

  • View
    45

  • Download
    3

Embed Size (px)

Citation preview

Page 1: Proprietary + Confidential Airbnb - HeadSpin studies/Airbnb/Airbnb... · 2020-03-09 · Proprietary + Confidential Device class Budget Moto E2 like OS version: 5 New York AT&T

Proprietary + Confidential

App performance reportPowered by HeadSpin

Airbnb

Page 2: Proprietary + Confidential Airbnb - HeadSpin studies/Airbnb/Airbnb... · 2020-03-09 · Proprietary + Confidential Device class Budget Moto E2 like OS version: 5 New York AT&T

Proprietary + Confidential

Device class BudgetMoto E2 like OS version: 5

New YorkAT&T<$250

Mid RangeLG Nexus 5x likeOS version: 7.1

Mountain ViewAT&T$250 - $500

High EndSamsung S8 likeOS version: 7.5

New YorkSprint$500+

Market share XX% XX% XX% HeadSpin Console

We tested your app by executing 10 iterations on key devices and operators

Page 3: Proprietary + Confidential Airbnb - HeadSpin studies/Airbnb/Airbnb... · 2020-03-09 · Proprietary + Confidential Device class Budget Moto E2 like OS version: 5 New York AT&T

Proprietary + ConfidentialProprietary + Confidential

App Startup

Page 4: Proprietary + Confidential Airbnb - HeadSpin studies/Airbnb/Airbnb... · 2020-03-09 · Proprietary + Confidential Device class Budget Moto E2 like OS version: 5 New York AT&T

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=3092nxybyb0otqw18e8nh5nty&locale=en-US&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

Page 5: Proprietary + Confidential Airbnb - HeadSpin studies/Airbnb/Airbnb... · 2020-03-09 · Proprietary + Confidential Device class Budget Moto E2 like OS version: 5 New York AT&T

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

Page 6: Proprietary + Confidential Airbnb - HeadSpin studies/Airbnb/Airbnb... · 2020-03-09 · Proprietary + Confidential Device class Budget Moto E2 like OS version: 5 New York AT&T

Proprietary + ConfidentialProprietary + ConfidentialHow Airbnb compares to peers on Time To InteractClient 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)

Page 7: Proprietary + Confidential Airbnb - HeadSpin studies/Airbnb/Airbnb... · 2020-03-09 · Proprietary + Confidential Device class Budget Moto E2 like OS version: 5 New York AT&T

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 methodsHung 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 methodsA 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

DependenciesSometimes 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

Page 8: Proprietary + Confidential Airbnb - HeadSpin studies/Airbnb/Airbnb... · 2020-03-09 · Proprietary + Confidential Device class Budget Moto E2 like OS version: 5 New York AT&T

Proprietary + ConfidentialProprietary + Confidential

App Login Time

Page 9: Proprietary + Confidential Airbnb - HeadSpin studies/Airbnb/Airbnb... · 2020-03-09 · Proprietary + Confidential Device class Budget Moto E2 like OS version: 5 New York AT&T

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 Requestsa. Example 1 has ~ 2 seconds of Time to First Byteb. Example 2 has ~ 780 ms of Time to First Bytec. Multiple requests to API each with Time to First Byte of ~ 600msd. Fixing these will save ~ 3.5 seconds

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

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

Page 10: Proprietary + Confidential Airbnb - HeadSpin studies/Airbnb/Airbnb... · 2020-03-09 · Proprietary + Confidential Device class Budget Moto E2 like OS version: 5 New York AT&T

Proprietary + ConfidentialProprietary + Confidential

APK size

Page 11: Proprietary + Confidential Airbnb - HeadSpin studies/Airbnb/Airbnb... · 2020-03-09 · Proprietary + Confidential Device class Budget Moto E2 like OS version: 5 New York AT&T

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%.

Page 12: Proprietary + Confidential Airbnb - HeadSpin studies/Airbnb/Airbnb... · 2020-03-09 · Proprietary + Confidential Device class Budget Moto E2 like OS version: 5 New York AT&T

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.

Page 13: Proprietary + Confidential Airbnb - HeadSpin studies/Airbnb/Airbnb... · 2020-03-09 · Proprietary + Confidential Device class Budget Moto E2 like OS version: 5 New York AT&T

Proprietary + ConfidentialProprietary + Confidential

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

Page 14: Proprietary + Confidential Airbnb - HeadSpin studies/Airbnb/Airbnb... · 2020-03-09 · Proprietary + Confidential Device class Budget Moto E2 like OS version: 5 New York AT&T

Proprietary + ConfidentialProprietary + Confidential

Battery usage

Page 15: Proprietary + Confidential Airbnb - HeadSpin studies/Airbnb/Airbnb... · 2020-03-09 · Proprietary + Confidential Device class Budget Moto E2 like OS version: 5 New York AT&T

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.

Page 16: Proprietary + Confidential Airbnb - HeadSpin studies/Airbnb/Airbnb... · 2020-03-09 · Proprietary + Confidential Device class Budget Moto E2 like OS version: 5 New York AT&T

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.

Page 17: Proprietary + Confidential Airbnb - HeadSpin studies/Airbnb/Airbnb... · 2020-03-09 · Proprietary + Confidential Device class Budget Moto E2 like OS version: 5 New York AT&T

Proprietary + ConfidentialProprietary + Confidential

Progressive loading

Page 18: Proprietary + Confidential Airbnb - HeadSpin studies/Airbnb/Airbnb... · 2020-03-09 · Proprietary + Confidential Device class Budget Moto E2 like OS version: 5 New York AT&T

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 a single request, or you can set blocks or scopes of requests to cancel.

● Ease of customization, for example, for retry and backoff.

● Strong ordering that makes it easy to correctly populate your UI with data fetched asynchronously from the network.

Images take 3-4s to load as you scrollYour code indicates you are using Glide to load images. Some image downloads are duplicated. One such Example, where an image is downloaded 4 times. This added an extra 1 second and additional 50KB download.

Page 19: Proprietary + Confidential Airbnb - HeadSpin studies/Airbnb/Airbnb... · 2020-03-09 · Proprietary + Confidential Device class Budget Moto E2 like OS version: 5 New York AT&T

Proprietary + ConfidentialProprietary + Confidential

Search Execution Time

Page 20: Proprietary + Confidential Airbnb - HeadSpin studies/Airbnb/Airbnb... · 2020-03-09 · Proprietary + Confidential Device class Budget Moto E2 like OS version: 5 New York AT&T

Proprietary + ConfidentialProprietary + Confidential

Search is fastest on AirBNB app in the Category

Budget Mid Range High end

View in HeadSpin Console

Page 21: Proprietary + Confidential Airbnb - HeadSpin studies/Airbnb/Airbnb... · 2020-03-09 · Proprietary + Confidential Device class Budget Moto E2 like OS version: 5 New York AT&T

Proprietary + ConfidentialProprietary + Confidential

Time to make a Reservation

Page 22: Proprietary + Confidential Airbnb - HeadSpin studies/Airbnb/Airbnb... · 2020-03-09 · Proprietary + Confidential Device class Budget Moto E2 like OS version: 5 New York AT&T

Proprietary + ConfidentialProprietary + ConfidentialHow AirBnB compares to peers on Time To Book

Rank App Time to Book

1 Vacation Rentals 3,700

2 Priceline 4,000

3 HotelTonight 6,800

4 Hotels.com 7,000

5 Trip (Gogobot) 7,000

6 Expedia 10,000

7 TripAdvisor 20,000

8 Booking.com 21,000

9 AirBNB 24,000

Rank App Time to Book

1 Priceline 3,000

2 TripAdvisor 3,000

3 Vacation Rentals 3,100

4 Hotels.com 4,000

5 HotelTonight 5,000

6 Trip (Gogobot) 6,000

7 Expedia 9,000

8 Booking.com 14,000

9 AirBNB 21,000

Rank App Time to Book

1 Priceline 3,500

2 Vacation Rentals 3,600

3 Hotels.com 6,000

4 HotelTonight 6,400

5 Expedia 8,000

6 Trip (Gogobot) 8,000

7 TripAdvisor 12,000

8 Booking.com 16,000

9 AirBNB 23,000

Budget Mid Range High End

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

Page 23: Proprietary + Confidential Airbnb - HeadSpin studies/Airbnb/Airbnb... · 2020-03-09 · Proprietary + Confidential Device class Budget Moto E2 like OS version: 5 New York AT&T

Proprietary + ConfidentialProprietary + Confidential

Your app take ~ 20-24s to a make a reservation

AirBNB.com (24s ) Expedia (10s ) Hotel Tonight (6.8s )

Page 24: Proprietary + Confidential Airbnb - HeadSpin studies/Airbnb/Airbnb... · 2020-03-09 · Proprietary + Confidential Device class Budget Moto E2 like OS version: 5 New York AT&T

Proprietary + ConfidentialProprietary + Confidential

Slow API Calls during Booking flow

Https POST to this request is ~ 4.7 seconds consistently. Fixing this will save significant time during reservation.

Client side slowness also making an impact on the booking time. This will need further debugging

Page 25: Proprietary + Confidential Airbnb - HeadSpin studies/Airbnb/Airbnb... · 2020-03-09 · Proprietary + Confidential Device class Budget Moto E2 like OS version: 5 New York AT&T

Proprietary + ConfidentialProprietary + Confidential

Slow Third Party Calls

Page 26: Proprietary + Confidential Airbnb - HeadSpin studies/Airbnb/Airbnb... · 2020-03-09 · Proprietary + Confidential Device class Budget Moto E2 like OS version: 5 New York AT&T

Proprietary + ConfidentialProprietary + Confidential

Several Third Party Calls are slow impacting UX

1. Google Calendar API is slowa. Average Time to First Byte is ~ 600msb. Examples - Request 1, Request 2, Request 3, Request 4 take > 1 second to

respondc. Consider merging these requests to save up to 4 seconds!

2. Branch.io makes an API request 10 times!a. Fixing this issue will save on the number of extra requestsb. Either merge or don’t make these requests

Page 27: Proprietary + Confidential Airbnb - HeadSpin studies/Airbnb/Airbnb... · 2020-03-09 · Proprietary + Confidential Device class Budget Moto E2 like OS version: 5 New York AT&T

Proprietary + ConfidentialProprietary + Confidential

Recommendation Summary

Page 28: Proprietary + Confidential Airbnb - HeadSpin studies/Airbnb/Airbnb... · 2020-03-09 · Proprietary + Confidential Device class Budget Moto E2 like OS version: 5 New York AT&T

Proprietary + Confidential

Summary of Recommendations1. Asynchronously load the FB SDK to boost the Time to Interact.2. Fixing Hot methods will speed up App startup time3. Eliminate or optimize Third party SDK usage. Examples include Third party calls to

GoogleAPI.com and Branch.com 4. The APK is large sized causing slow download/install time on Budget/Mid-Range phones and

on operators5. Using Volley will speed up the progressive loading of images6. Power consumption of the app can be significantly reduced by

a. Optimizing Third Party SDK callsb. Merging API requestsc. Merging CDN Requestsd. Converting the JPEGs to WEBPse. Reusing CDN TCP/TLS Connections

7. Boost App login time by optimizing calls to Google API8. Boost App booking time by optimizing the following:

a. Google Calendar API callsb. One Airbnb specific Https POST call that always consumes ~ 4.7 seconds

Page 29: Proprietary + Confidential Airbnb - HeadSpin studies/Airbnb/Airbnb... · 2020-03-09 · Proprietary + Confidential Device class Budget Moto E2 like OS version: 5 New York AT&T

Proprietary + ConfidentialProprietary + Confidential

HeadSpin Console

Page 30: Proprietary + Confidential Airbnb - HeadSpin studies/Airbnb/Airbnb... · 2020-03-09 · Proprietary + Confidential Device class Budget Moto E2 like OS version: 5 New York AT&T

Proprietary + ConfidentialProprietary + ConfidentialClient-Server AI based issue detection

Page 31: Proprietary + Confidential Airbnb - HeadSpin studies/Airbnb/Airbnb... · 2020-03-09 · Proprietary + Confidential Device class Budget Moto E2 like OS version: 5 New York AT&T

Proprietary + ConfidentialProprietary + ConfidentialClient-Server AI based issue detection

Page 32: Proprietary + Confidential Airbnb - HeadSpin studies/Airbnb/Airbnb... · 2020-03-09 · Proprietary + Confidential Device class Budget Moto E2 like OS version: 5 New York AT&T

Proprietary + ConfidentialProprietary + ConfidentialClient Side AI based issue detection

Page 33: Proprietary + Confidential Airbnb - HeadSpin studies/Airbnb/Airbnb... · 2020-03-09 · Proprietary + Confidential Device class Budget Moto E2 like OS version: 5 New York AT&T

Proprietary + ConfidentialProprietary + Confidential

Thank you!

You can test your app on >20k devices and 150+ locations using headspin.io