Skip to content

Avoid Gitaly n+1 times per request for Project Branches performance

What does this MR do?

Enables us to reuse root_ref_hash (the commit hash of the default branch).

Are there points in the code the reviewer needs to double check?

How can I check if there are N+1 Gitaly calls in the CI tests?

Instead of the CI, the following is the test results on my local macOS 10.13 with GDK env:

Before After
1292.13ms / 44 gitaly 118ms / 5 gitaly

Why was this MR needed?

To avoid N+1 Gitaly queries to improve the page speed.

Does this MR meet the acceptance criteria?

What are the relevant issue numbers?

Closes #44657 (closed)

Closes #37429 (closed)

Might help #12619 (moved)

Edited by Takuya Noguchi

Merge request reports