2019-09-04 21:01:54 +05:30
---
2020-06-23 00:09:42 +05:30
stage: Create
group: Source Code
2022-11-25 23:54:43 +05:30
info: To determine the technical writer assigned to the Stage/Group associated with this page, see https://about.gitlab.com/handbook/product/ux/technical-writing/#assignments
2019-09-04 21:01:54 +05:30
type: reference
---
2021-03-11 19:13:27 +05:30
# Diff limits administration **(FREE SELF)**
2018-12-05 23:21:45 +05:30
2019-09-04 21:01:54 +05:30
You can set a maximum size for display of diff files (patches).
2021-06-08 01:23:25 +05:30
For details about diff files, [view changes between files ](../project/merge_requests/changes.md ).
2021-09-04 01:27:46 +05:30
Read more about the [built-in limits for merge requests and diffs ](../../administration/instance_limits.md#merge-requests ).
2019-12-04 20:38:33 +05:30
2021-09-04 01:27:46 +05:30
## Configure diff limits
2019-09-04 21:01:54 +05:30
2021-09-04 01:27:46 +05:30
WARNING:
These settings are experimental. An increased maximum increases resource
consumption of your instance. Keep this in mind when adjusting the maximum.
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:
2021-09-30 23:02:18 +05:30
| Value | Definition | Default value | Maximum value |
| ----- | ---------- | :-----------: | :-----------: |
| **Maximum diff patch size** | The total size, in bytes, of the entire diff. | 200 KB | 500 KB |
| **Maximum diff files** | The total number of files changed in a diff. | 1000 | 3000 |
| **Maximum diff lines** | The total number of lines changed in a diff. | 50,000 | 100,000 |
2019-09-04 21:01:54 +05:30
2021-09-04 01:27:46 +05:30
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.
2019-09-04 21:01:54 +05:30
2021-09-04 01:27:46 +05:30
To configure these values:
2018-12-05 23:21:45 +05:30
2022-10-11 01:57:18 +05:30
1. On the top bar, select **Main menu > Admin** .
2021-11-11 11:23:49 +05:30
1. On the left sidebar, select **Settings > General** .
2019-09-04 21:01:54 +05:30
1. Expand **Diff limits** .
2021-09-30 23:02:18 +05:30
1. Enter a value for the diff limit.
2021-06-08 01:23:25 +05:30
1. Select **Save changes** .
2018-12-05 23:21:45 +05:30
2019-09-04 21:01:54 +05:30
<!-- ## Troubleshooting
2018-12-05 23:21:45 +05:30
2019-09-04 21:01:54 +05:30
Include any troubleshooting steps that you can foresee. If you know beforehand what issues
one might have when setting this up, or when something is changed, or on upgrading, it's
important to describe those, too. Think of things that may go wrong and include them here.
This is important to minimize requests for support, and to avoid doc comments with
questions that you know someone might ask.
2018-12-05 23:21:45 +05:30
2023-01-13 00:05:48 +05:30
Each scenario can be a third-level heading, for example `### Getting error message X` .
2019-09-04 21:01:54 +05:30
If you have none to add when creating a doc, leave this section in place
but commented out to help encourage others to add to it in the future. -->