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?
-
Changelog entry added, if necessary - [n/a] Documentation created/updated
- [n/a] API support added
-
Tests added for this feature/bug - Review
- [n/a] Has been reviewed by UX
- [n/a] Has been reviewed by Frontend
-
Has been reviewed by Backend - [n/a] Has been reviewed by Database
-
Conform by the merge request performance guides -
Conform by the style guides -
Squashed related commits together - [n/a] Internationalization required/considered
- [n/a] End-to-end tests pass (
package-and-qa
manual pipeline job)
What are the relevant issue numbers?
Closes #44657 (closed)
Closes #37429 (closed)
Might help #12619 (moved)
Edited by Takuya Noguchi