As of this writing (2021-03-23), the Projects::MergeRequests::DiffsController#diff_for_path.json action can execute around 552 SQL queries max.
Projects::MergeRequests::DiffsController#diff_for_path.json
In average though, it only takes ~38 queries. This shows that there's a possible N+1 issue here.