Paginate branches on Rugged level
Right now when visiting the branches page the process is basically as following:
- Grab all the branches in a repository
- 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:
- 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).
- Set up a benchmark to measure the time it takes to iterate over the first 10 branches
- Measure the time using the actual limit mentioned above
Edited by 🤖 GitLab Bot 🤖