Skip to content

Request visible batch of commit data first when lazy loading

Jacques Erasmus requested to merge 343000-lazy-load-first-batch into master

What does this MR do and why?

In !71633 (merged) we added the ability to lazy load commit data in batches.

In order to support lazy loading in reverse (scrolling up), we load the batch above the currently visible batch as well.

As a further enhancement, changes in this MR ensure that we load the batch above the currently visible batch first, that way the user sees the visible batch of commit data faster.

Screenshots or screen recordings

before after
before after

How to set up and validate locally

Numbered steps to set up and validate the change are strongly suggested.

  1. Enable the lazy loading
    Feature.enable(:lazy_load_commits)
  2. Visit a repo page with many files.
  3. Drag the scrollbar down and notice the order in which the batches load.

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 #343000 (closed)

Edited by Jacques Erasmus

Merge request reports

Loading