Paginate branches on Rugged level

Right now when visiting the branches page the process is basically as following:

  1. Grab all the branches in a repository
  2. Limit the resulting array to N (where N is the amount of rows to display)

It might be more efficient to apply the limit on Gitlab::Git/Rugged level, removing the need to iterate over all branches when only displaying N of them at a time.

Steps to take:

  1. Investigate Rugged to see if the above would have any impact on performance (e.g. it wouldn't if Rugged just loads all branches in one go).
  2. Set up a benchmark to measure the time it takes to iterate over the first 10 branches
  3. Measure the time using the actual limit mentioned above
Edited Sep 02, 2020 by 🤖 GitLab Bot 🤖
Assignee Loading
Time tracking Loading