Lazy load commit data

Merged Jacques Erasmus requested to merge 337226-lazy-load-commit-data into master

What does this MR do and why?

Currently, when viewing a repository with many entries the page becomes very unresponsive and eventually freezes.

This MR adds functionality to lazy load commit data which significantly reduces the load on the frontend and backend.


On the repository file browser, we make two types of requests to populate the table:

  • Request 1: The files (file names) that populate the table.
  • Request 2: The commit data (Last commit, Last update) associated with each file, we request this data in batches of 25.

This MR intends the optimize Request 2 by lazy loading the data instead of loading commit data for all of the files that have been requested in Request 1.

Screenshots or screen recordings

Before After
Pages with many entries takes long to load and eventually freezes the browser Page with many entries lazy loads commit data and remains interactive
before after

How to set up and validate locally

Example below:

  1. Enable the lazy load feature flag
  2. Visit a page with many entries
  3. Notice how the commit data is lazy loaded and the page remains interactive.

MR acceptance checklist

This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.

Related to #337226 (closed)

Edited by Jacques Erasmus