You can set a maximum size for display of diff files (patches).
To speed the loading time of merge request views and branch comparison views on your instance, you can configure three instance-level maximum values for diffs:
- Maximum diff patch size: The total size, in bytes, of the entire diff.
- Maximum diff files: The total number of files changed in a diff.
- Maximum diff files: The total number of files changed in a diff. The default value is 1000.
- Maximum diff lines: The total number of lines changed in a diff. The default value is 50,000.
When a diff reaches 10% of any of these values, the files are shown in a collapsed view, with a link to expand the diff. Diffs that exceed any of the set values are presented as Too large are cannot be expanded in the UI.
To configure these values:
- On the top bar, select Menu > Admin.
- In the left sidebar, select Settings > General.
- Expand Diff limits.
- Enter a value for Maximum diff patch size, measured in bytes.
- Select Save changes.