USe innerHtml to avoid slow performance on a MR with very large diff

parent 4a29669d
...@@ -144,9 +144,8 @@ class @MergeRequestTabs ...@@ -144,9 +144,8 @@ class @MergeRequestTabs
@_get @_get
url: "#{source}.json" + @_location.search url: "#{source}.json" + @_location.search
success: (data) => success: (data) =>
html = $(data.html) document.getElementById('diffs').innerHTML = data.html
html.syntaxHighlight() $('div#diffs .js-syntax-highlight').syntaxHighlight()
$('#diffs').html(html)
@diffsLoaded = true @diffsLoaded = true
@scrollToElement("#diffs") @scrollToElement("#diffs")
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment