Blame page streaming
In order to support Remove pagination or limits for file blame (v15... (#369858 - closed) we have to consider a different approach to rendering the Blame page which should do two things:
- Load all the data on the page
- Introduce no additional delay to the first paint of the page
We can achieve that by progressively rendering the page using streaming (The RFC applies to non-Vue streaming techniques as well).
With streaming on the client-side the process of loading a page would look like this:
- Render the first page of the Blame on the Rails SSR
- Fetch all the remaining rendered pages on the client in parallel
- Stream the fetched pages as soon as they're ready
Example of the implementation: Draft: POC: blame page streaming (!97611 - closed)
In order for this to work properly we have to address the following points:
- Introduce a new API for the rendered Blame pages only (excluding layout)
- Handle layout thrashing (do not insert very small chunks frequently)
- Handle anchor links for the streamed pages
- (Potentially) Scrolling retain after page refresh
- (Potentially) Handle back-forward cache
- Testing
Edited by Stanislav Lashmanov