"find_commit" Gitaly N+1 when fetching commit information on MR
We're currently having N+1 calls for Gitaly find_commit endpoint when presenting discussions:
Steps to reproduce
- Create a MR
- Comment on a diff file
- Outdate this diff file (change it and push)
- You'll be able to see a new
find_commitcall for each new outdated file
Seems like we could be batching these requests using Gitlab::Git::Commit.batch_by_oid with BatchLoader, similarly as we lazy load Blobs.
Edited by Oswaldo Ferreira
