Skip to content

Optimization for `#readme_path` discovery

Vasilii Iakliushin requested to merge 386627_fetch_readme_from_gitaly into master

What does this MR do and why?

Contributes to #386627

Problem

readme_path detection is not optimized and triggers two Gitaly queries just to detect the readme path.

Solution

  • Remove unnecessary FindCommit call
  • Use SearchFileByName API instead of GetTreeEntries

Screenshots or screen recordings

Before After

How to set up and validate locally

  1. Enable feature flag readme_from_gitaly
  2. Use a profiler for URL: http://127.0.0.1:3000/api/v4/projects

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