http://reviews.reviewboard.org/
What version are you running?
1.5 RC 1
What's the URL of the page this enhancement relates to, if any?
The diff viewer.
Describe the enhancement and the motivation for it.
We have various tools that generate source code; sometimes these generated files are huge. Sometimes developers submit diffs of those generated files for code review. Sometimes those diffs are small enough that they actually get published (i.e. post-review doesn't time out) but still large enough to be virtually meaningless to a reviewer. We've added a very small change to diffviewer/forms.py (see below) to hide these changes.
What operating system are you using? What browser?
N/A
Please provide any additional information below.
We've modified diffviewer/forms.py as follows, starting at line 155:
# treat gigantic diffs as binary
maxDiffSizeK = 255
diffSizeK = len(f.data) / 1024
if (diffSizeK > maxDiffSizeK):
f.binary = True
f.data = ""
We didn't submit this as a patch because there's probably a better way of doing it, but if it sounds reasonable we can do so.