Reduce the size of a blobs that we request
What does this MR do and why?
Currently what we are doing is, we tell gitaly, to send 10mb of each blob back, when we are lazy loading diff files, we use this default, then when we process the files, then we say, files bigger than 500kb, prune here and we check if its too large based on self.class.patch_hard_limit_bytes
which is a setting with an upper bound of 500kb.
We seem to only prune if 'eligible', but all the diffs seems to be 'eligible', as they are eligible
if they are larger than the patch_hard_limit_bytes
and if they come from a Hash
or Gitlab::GitalyClient::Diff
.
So the idea here is to reduce the amount of data that gitaly is sending us, as we prune it anyway for diff files.
Related Issue with discussion: #424140 (comment 1597557558)
Edited by Marc Shaw