Helix Core is now P4 and Helix Swarm is now P4 Code Review. Product user interfaces will be updated soon. Learn more >>

Documentation | 2025.4

# Diff configuration

P4 Code Review's Diffs feature can be customized via the following config item.

If you make a configuration change, P4 Code Review will not use it until the configuration cache has been reloaded, this forces P4 Code Review to use the new configuration.

You must be an admin or super user to reload the P4 Code Review config cache. Navigate to the User id dropdown menu, select System Information, click the Cache Info tab, and click the Reload Configuration button.

## max_diffs

This is the maximum number of lines in a diff that are displayed in a review. If the number of lines in a diff is greater than the configured maximum, the amount of lines displayed is truncated by default. An option is provided to display the whole diff for a file.

        'diffs' => array(
            'max_diffs' => 1500,
        ),

The `max_diffs` configuration only works on the classic view of the Review page. On preview view, the Review page displays the whole diff, regardless of the `max_diffs` configuration.

To limit the number of diffs lines in the preview view, use the `max_size` configuration. For more information, see max_size.

## max_total_diff_size

If the maximum size of the total diffs of a file exceeds the value set for max_total_diff_size, the first unread file will remain closed. By default, max_total_diff_size is set to 0.5 MB.

        'diffs' => array(
            'max_total_diff_size' => 200000, // maximum size of the total diffs of a file in bytes, defaults to 0.2 MB
        ),

From P4 Code Review 2025.2 and onwards, the `max_total_diff_size` configuration only works on the new view of the Review page.

Your search for returned results