Profile Gitaly requests when streaming diffs using DiffBlobs RPC
<!--IssueSummary start--> <details> <summary> Everyone can contribute. [Help move this issue forward](https://handbook.gitlab.com/handbook/marketing/developer-relations/contributor-success/community-contributors-workflows/#contributor-links) while earning points, leveling up and collecting rewards. </summary> - [Close this issue](https://contributors.gitlab.com/manage-issue?action=close&projectId=278964&issueIid=510247) </details> <!--IssueSummary end--> In https://gitlab.com/gitlab-org/gitlab/-/merge_requests/174863#note_2250908739, testing shows that using DiffBlobs RPC when streaming diff files can be slower than when using CommitDiff RPC. Other than a separate issue regarding [collapsed files](https://gitlab.com/gitlab-org/gitlab/-/issues/509621), @ghinfey [noticed that DiffBlobs is ~3x slower even for smaller diffs](https://gitlab.com/gitlab-org/gitlab/-/merge_requests/174863#note_2261213207): ``` ruby diff_blobs: false, gitaly_duration_s: 0.0770038, db_main_duration_s: 0.0462, duration_s: 0.34266 diff_blobs: true, gitaly_duration_s: 0.2112101, db_main_duration_s: 0.0487, duration_s: 0.473484 ``` @justintobler noted that at the time of this writing (2024-12-19), `DiffBlobs` is expected to perform worse than `CommitDiff` ([comment](https://gitlab.com/gitlab-org/gitlab/-/merge_requests/174863#note_2263586446)). There are some upstream changes to Git being worked on to improve this. Once we have those changes, we should test and profile again.
issue