Page MenuHomePhabricator

Load Media API asynchronously (Performance Recommendation)
Open, MediumPublic

Description

Currently,

It loads the media API together with article section API and suggested articles API, user wait until all API done to reach the article page

Wanted,

Load Media API asynchronously so users don't get blocked by this API and enter the article reading page a.s.a.p. when article section information is enough there.

Event Timeline

hueitan renamed this task from Load Media API asynchronously to Load Media API asynchronously (Performance Recommendation).Mar 2 2020, 4:45 PM

@hueitan: Assuming this task is about the KaiOS-Wikipedia-app code project, hence adding that project tag so other people who don't know or don't care about random team tags can also find this task when searching via projects.

It makes sense to load media and suggested articles after the article is rendered. It would certainly speed up initial rendering. However, the gallery button is present based on the existence of images in any given article so we would have to think about a different UX. We could

  1. Hide the gallery button until we know for sure that there are images. One drawback is that by the time we get the response, the user has likely moved beyond the first page so they would have missed the option to explore the gallery. They can still access it from the menu but is it much less inviting.
  2. Show the gallery button and be prepared to show different states inside the gallery view (still loading, sorry no images, all images)
  3. Show the gallery button and fetch the gallery only when the user goes there.

The same is true for the suggested articles but since it is shown at the very end of the article view we could go with something similar to #2 above with very little negative impact.

@SBisson My preference is for number 2, then 3 for gallery. For suggested articles, I recommend number 1. I assume that users rarely reach the end of the article, is there a way we can confirm that?

@SGautam_WMF, would appreciate your view here.