When we paginate things onto the diff viewer, we do it at the wrong time in the process. What we do today is: 1. For each file in the diff a. Fetch the file from the SCM b. Patch the file 2. Diff 3. Paginate 4. Render Rendering can be an expensive step, but not that expensive. Really what we should be doing is: 1. Paginate 2. For each file on the page a. Fetch the file from the SCM b. Patch the file 3. Diff 4. Render