Skip to content

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:

  1. Load all the data on the page
  2. 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:

  1. Render the first page of the Blame on the Rails SSR
  2. Fetch all the remaining rendered pages on the client in parallel
  3. 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:

  1. Introduce a new API for the rendered Blame pages only (excluding layout)
  2. Handle layout thrashing (do not insert very small chunks frequently)
  3. Handle anchor links for the streamed pages
  4. (Potentially) Scrolling retain after page refresh
  5. (Potentially) Handle back-forward cache
  6. Testing
Edited by Stanislav Lashmanov