Speed up loading and rendering of diffs.

Review Request #8892 — Created April 10, 2017 and submitted — Latest diff uploaded

Information

Review Board
release-2.5.x
d6630be...

Reviewers

When working with large diffs, there's slowdown when injecting the HTML
for the diff and setting it up. As part of the setup, we make some CSS
changes to elements in the rendered diff, and if the browser is bogged
down rendering a large diff, this can just slow things down further.

To deal with this, we now hide the parent of the rendered diff and then
manually inject the HTML using the innerHTML attribute, instead of going
through jQuery (which is going to be slower for this operation, in our
case), re-showing the element when we're finished the render. This
speeds up diff load times a fair amount.

Loaded several diffs, small and large. Timed performance and saw
noticeable improvements with large diffs.

    Loading...