Product Discovery for progressive merge request discussions
Problem to solve
Loading merge request discussions is really slow for large merge requests, and cause the page load to fail with no discussions loaded because of server side timeouts. Fundamentally loading all the data in one go is an approach that doesn't scale.
Further details
The purpose of the issue is to propose iterations that will make the merge request interface usable faster.
There is more complexity in merge request discussions relative to issue/epic discussion because of discussions on changed lines. This means, while looking at a diff and the discussions are still loading, comments could start appearing causing the diff to reflow.
Proposal
Before diving into &1577, we should consider the gitlab-ce3412464, gitlab-ce2024184, and gitlab-ce~24926493 implications of progressively loading discussions to make the page more responsive.
discussions.json
slow - we need to tackle performance from multiple angles!
Rough proposal:
- Paginate discussions and load them page-by-page, with progress indication at the bottom of the discussion list indicating more discussions are loading. Perhaps load from the top and bottom, and meet in the middle? TLDR: user shouldn't have to scroll or click to disclose all the data - we will preserve the property that the page should fully load all discussions.
-
❗ Challenge: this change creates the diff reflow problem, which might be fine for a release or two but we should form a plan. -
💡 Idea include discussion information in the diff response- very basic information for resolved diff discussion about which line to show the bubble
- all information for unresolved diff discussions that are not out of date to render the full thread
- downside, we're downloading the same data twice, but the page would be useful sooner