Page MenuHomePhabricator

[SPIKE] Investigate how Android app performance holds up when making multiple API calls for Search
Closed, ResolvedPublic

Description

Background
The team is working to improve search results by offering recommendations based on user behavior. This task is to investigate if the performance of the app or APIs used would be impacted as a result of this feature.

Task

  • Create quick demo of performance for results that include multiple API responses
  • Create quick demo of performance for results that only comes from one API response depending on the recent opened article/ visited location/ current languages

APIs to Evaluate

  • Morelike API (based on your recent search or recently opened article)
  • Rest API (mostly only Top read)
  • Nearby API (based on your current location, or your recently opened article)

Event Timeline

Hi @JTannerWMF

The SPIKE is completed, and although the logic of loading APIs can still be improved, I believe there are some beneficial results:


Demo: https://www.youtube.com/watch?v=8tWi3jdz5A8
APK: https://github.com/wikimedia/apps-android-wikipedia/pull/4859

Create quick demo of performance for results that include multiple API responses
Create quick demo of performance for results that only comes from one API response depending on the recent opened article/ visited location/ current languages

Please check the demo video or download the APK to see how it works with multiple API calls vs single API call.


Performance results of different scenarios:

Multiple API calls
Local queriesfeed + morelikefeed + morelike + geosearchfeed + morelike + geosearch + random
< 50ms< 150ms300 ~ 500ms> 2500ms
Single API call
Local queryfeed / morelikegeosearchrandom
< 50ms< 150ms< 400ms> 2000ms

Please note the first morelike API call will take a longer response time, which is ~300 - 500 ms. After it is cached, the response time will be faster.

I can run a live demo in the Android deep dive to see the actual performance.