Improve performance of diffs_batch action for Projects::MergeRequests::DiffsController under load to target

After some great work the diffs_batch.json action for Projects::MergeRequests::DiffsController is now performing notably better than before in the severity4 tier:

* Environment:                10k
* Environment Version:        15.6.0-pre `b3b57d2f6f5`
* Option:                     60s_200rps
* Date:                       2022-11-04
* Run Time:                   1h 34m 49.48s (Start: 04:47:21 UTC, End: 06:22:10 UTC)
* GPT Version:                v2.11.0

NAME                                                     | RPS   | RPS RESULT           | TTFB AVG  | TTFB P90              | REQ STATUS     | RESULT 
---------------------------------------------------------|-------|----------------------|-----------|-----------------------|----------------|--------
web_project_merge_request_changes                        | 20/s  | 18.64/s (>16.00/s)   | 499.05ms  | 682.63ms (<1500ms)    | 100.00% (>99%) | Passed¹

    http_req_waiting................................................................: avg=499.05ms  min=150.41ms  med=529.21ms  max=3579.78ms  p(90)=682.63ms   p(95)=722.94ms  
     ✓ { controller:Projects::MergeRequests::DiffsController#diffs_batch.json }......: avg=512.10ms  min=150.41ms  med=547.04ms  max=3579.78ms  p(90)=691.61ms   p(95)=726.86ms  
     ✓ { controller:Projects::MergeRequests::DiffsController#diffs_metadata.json }...: avg=382.66ms  min=358.20ms  med=376.63ms  max=476.71ms   p(90)=406.45ms   p(95)=421.69ms 

The endpoint was tested on our 10k Reference Architecture with a RPS target of 20/s against the page (spread across each controller action). It targeted an MR on our own gitlabhq project that has a 99th percentile of changes - 187.

As per our performance targets the controller action is above our main target of 200ms and fall under the severity4 tier. Task is to improve the action's performance to meet the target of 200ms.

Edited by Grant Young