Migration Analysis: Projects::BranchesController#index
~Conversation: #217 (closed)
Related to: https://gitlab.com/gitlab-org/gitlab-ce/issues/27379
Goal: perform a migration analysis on the Projects::BranchesController#index
controller in GitLab-Rails.
TODO
-
Investigate required changes in gitlab-rails
- According to graphana's WALL time chart shows that the most time consuming operations involve
Repository#branches_sorted_by
. Running a profiling on that action when sorting gives the following data:
- According to graphana's WALL time chart shows that the most time consuming operations involve
We can see we spend most of the time within Rugged::BranchCollection#each, and decorating each of these references to create Gitlab::Git::Branch
objects. It may be because I worked on optimizing this code before (local_branches
to gitaly allowing them to be sorted. This response should include all the necessary data to create the Gitlab::Git::Branch
object, including the Gitlab::Git::Commit
object for the head reference. This will allow us to sort and condense all the data in one operation, which even without caching should help speed this action.
-
Add GRPC calls to gitaly-proto
gitaly-proto!12 (merged) -
Implement required changes in gitaly
!103 (merged)-
Implement GRPC call Ref#local_branches
-
-
Implement required changes in gitlab-rails
https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/10059