Optimization for `#readme_path` discovery
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 ofGetTreeEntries
Screenshots or screen recordings
Before | After |
---|---|
How to set up and validate locally
- Enable feature flag
readme_from_gitaly
- 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.
-
I have evaluated the MR acceptance checklist for this MR.
Edited by Vasilii Iakliushin