Optimize `head_tree` code
What does this MR do and why?
Contributes to #386627 (closed)
Problem
Each request to fetch readme_path or avatar_path triggers two Gitaly
requests: FindCommit and GetTreeEntries. It's not efficient, because FindCommit is not necessary.
Solution
Remove FindCommit request and rely on the default branch to fetch
repository tree.
Screenshots or screen recordings
| Before | After |
|---|---|
![]() |
![]() |
How to set up and validate locally
Numbered steps to set up and validate the change are strongly suggested.
MR acceptance checklist
This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.
-
I have evaluated the MR acceptance checklist for this MR.
Edited by Vasilii Iakliushin

