Load issue page comments in chunks asynchronously
The goal of this issue is to improve the performance of the comments on the issue page.
- Initial load of comments.
- Performance of loaded comments.
The goal is for comments to work with a small and large amount of comments.
- Load issue page comments in chunks asynchronously.
- When the issue page loads, do not render all the comments at once. Instead, render them asynchronously in chunks.
- That is, after initial page load, the comments come in chunks, one after the other, until all comments are retrieved and rendered on the page.
- Note that this is not infinite scrolling. Since the chunks loading occurs automatically as soon as the page loads.
- When you open an issue page without deep linking to anything, the chunks come in order, oldest chunks to newest chunks.
- When you open an issue page linked to a specific comment, that comment loads first, and then comment chunks above and below load asynchronously.
- The total time to load comments should be less than or equal to loading the entire page with comments synchronously now, so that the net improvement is that you can see content earlier, but accessing the newest comment still takes the same time. I.e. end-to-end time remains the same or is improved.
- With this design, you can still search/find on the page using browser find, i.e. cmd+f/ctrl+f.
- With this design, you can still get to the bottom of the page and view the newest comment quickly once all the comments load.
- This is for issues only. Not merge requests.
To be determined
- How should the comment box behave? Should it be loaded immediately? Or along with the final chunk at the end?
- if linking to a specific comment, how to load chunks above and below that comment?
- Should there be any skeletons during the async loading?
- What should the chunk size be?
Skeleton Loading Design
Building block:
In action it would look like:
Edited by Dimitrie Hoekstra