Speed up loading and rendering of diffs.

Review Request #8892 - Created April 10, 2017 and submitted

Christian Hammond
Review Board
release-2.5.x
d6630be...
reviewboard
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.

  • 0
  • 0
  • 2
  • 0
  • 2
Description From Last Updated
Barret Rennie
David Trowbridge
Christian Hammond
David Trowbridge
Christian Hammond
David Trowbridge
Christian Hammond
Review request changed

Status: Closed (submitted)

Change Summary:

Pushed to release-2.5.x (6d38447)
Loading...