RHGitaly implement CommitService.TreeEntry
According to the stats taken just now on foss.heptapod.net, this is third-most frequent request:
TOTAL Requests: 679185
Breakdown:
47.5% FindCommitRequest (count=322444)
9.4% RefExistsRequest (count=64032)
7.5% TreeEntryRequest (count=50906)
6.1% FindCommitsRequest (count=41316)
4.7% GetTreeEntriesRequest (count=32113)
(Statistics since 2023-04-29 18:47:13,342 until now)
This request is especially interesting because it can be heavy and blocking for the Python implementation, as it is the main retriever for blobs, being the gRPC method behind Rails' Gitlab::Git::Blob.find
, itself used by GitLab::Git::Repository#blob_at
.
But the requested tree entry can itself be a sub tree, which forces us to implement some of the manifest mining (non-recursive, and without the dreadful flat_path
analysis). The manifest mining is a performance problem in itself, which of course would be mitigated by a Rust implementation (one day we may have a cache to reduce that burden).
GetTreeEntriesRequest
, on the other hand, would require the full manifest mining, hence we'll probably wait a bit more.