GRPC::DeadlineExceeded when rendering Rapid Diffs with large blobs
We might not render a Rapid Diffs page entirely when it has binary diffs with large blobs. This is a regression because legacy commit diffs allow us to do that.
Example commit that fails to render: biloba-ut/ut-hw-models@202852da
Same commit in legacy diffs: biloba-ut/ut-hw-models@202852da
Root cause
We render placeholders for binary diffs. These placeholders indicate both why a diff can not be displayed and the type of the change. In order to determine the type of the change we need to know whether the contents of the file were actually changed. We do that by calling empty? on the Diff::File object. This in turn fetches old and new blobs of the diff file and checks whether they exist. Then we do the same for content_changed? check, which compares blob IDs. If blobs are extremely large this might exhaust both Gitaly and Rails app.