Better diff collapsing
Right now, diff collapsing is kind of a mess:
- We collapse individual diffs over 100 KB.
- We collapse diffs after the diffs rendered so far have reached:
- 100 files.
- 5,000 lines.
- 500 KB.
Changing this is pretty painful. However, with diffs in MRs having their own table, and diffs for commits and compare being moved to Gitaly, we can be smarter. For instance, we could handle the collapse limits in Gitaly, or in the database (although that would need some SQL trickery that might not work out any faster than doing this in Ruby.)
We could also do 'infinite scroll' for diffs - we could actually do this now, but it's easier if we aren't loading the whole thing in Ruby some of the time anyway - where we load all the filenames, and the 'first page' of content initially, then have the frontend handle the rest of the content.
Edited by Douwe Maan