Make large commits usable
There was recently a ticket to fix Gitlab's UI when dealing with large-changeset commits (https://gitlab.com/gitlab-org/gitlab-ce/issues/10785). The patch successfully prevents Gitlab from crashing completely when trying to load a large commit, but now the page that Gitlab generates can be unusably slow.
To reproduce this: Try viewing this commit in my repository: https://gitlab.com/nrclark/dummy_project/commit/81ebdea5df2fb42e59257cb3eaad671a5c53ca36 in Firefox, and probably in other browsers as well.
Even though it only diffs 3 files now, it shows the full diffs of all of those files. On this particular commit, that winds up being approximately 4000 lines of diff. Using the newest Firefox, just having the commitdiff open makes my entire browser slow to a crawl. I can't scroll through the page, and Gitlab's UI becomes totally unusable.
The right behavior is probably to truncate the commitdiff at maybe 512 lines or something.