Investigate if BranchesController#index.json can avoid loading some information from Gitaly by paginating
Everyone can contribute. Help move this issue forward while earning points, leveling up and collecting rewards.
The following discussion from !74058 (merged) should be addressed:
-
@reprazent
started a discussion: (+2 comments)I think this makes sense for all of these. But
#index
is busy enough to look into further.This endpoint also seems to have very different characteristics based on the format. The
json
format is called way more often, and only renders branch names: https://gitlab.com/gitlab-org/gitlab/blob/636f2ca5ba3769719dc865a01f9445f89fcf0ff9/app/controllers/projects/branches_controller.rb#L45 An optimization there could be to not load branches that we'll filter out with#paginate_array
, but instead use the pagination Gitaly provides: https://gitlab.com/gitlab-org/gitlab/blob/636f2ca5ba3769719dc865a01f9445f89fcf0ff9/app/finders/branches_finder.rb#L9I think we should be able to set a higher urgency for the more common JSON part of this.