Use Gitaly keyset pagination to optimize branches page
Gitaly keyset pagination returns a limited number of branches. We can use it instead of fetching all branches and then paginating them manually. Projects::BranchesByModeService is introduced. It uses Gitaly page-token pagination in order to optimally fetch branches. The drawback of the page-token pagination is that it doesn't provide an option of going to the previous page of the collection. That's why we need to fall back to offset pagination when previous page is requested.
Showing
Please register or sign in to comment