Description
Abstractwiki content fragments are requested in batch when:
- page initialization,
- changing the selected language for the preview.
Abstractwiki content fragments are requested one by one when:
- adding a new fragment,
- editing an existing fragment,
- when clicking a "Retry" after a max retries warning or 503/500 error
When requesting fragments one-by-on we request them synchronously.
When requesting all fragments, we queue requests at the front-end side
Issues
- We need to slow down requests very heavily, which means that even if the responses are cached, loading the page takes a very long time.
Proposal
- We build a batch request, that returns all fragments for the page, only if they are cached.
- The response need to be structured by fragment, and indexed properly so that they can be retried easily.
- The batch request will only return the status, and will also create the necessary jobs to refresh all fragments that aren't cached.
- The UI will either render the fragment received, or a [not ready, retry later] marker, which can be clicked to launch a retry after some time
Completion checklist
- Before closing this task, review one by one the checklist available here: https://www.mediawiki.org/wiki/Abstract_Wikipedia_team/Definition_of_Done#Front-end_Task/Bug_Completion_Checklist