Skip to content

Optimize `head_tree` code

Vasilii Iakliushin requested to merge 386627_optimize_head_tree into master

What does this MR do and why?

Contributes to #386627

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
Screenshot_2023-01-26_at_17.09.22 Screenshot_2023-01-26_at_17.16.38

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.

Edited by Vasilii Iakliushin

Merge request reports

Loading