diff options
| author | Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com> | 2015-06-05 13:34:16 +0000 |
|---|---|---|
| committer | Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com> | 2015-06-05 13:34:16 +0000 |
| commit | 3b9792ec72e9bb00305fb85ed6fb164211903147 (patch) | |
| tree | 976dd3ca668b895c3970647a2aa9cc9d1d8063b9 /app | |
| parent | 3f59a8f0be101c2405372d05a304540beb1b6d01 (diff) | |
| parent | 9a50db693a301e69524dc0aadeeba03f5f3ff9db (diff) | |
| download | gitlab-ce-3b9792ec72e9bb00305fb85ed6fb164211903147.tar.gz | |
Merge branch 'fix-long-blob-timeout' into 'master'
Fix timeout when rendering file with thousands of lines.
Addresses internal issue https://dev.gitlab.org/gitlab/gitlabhq/issues/2354.
See merge request !771
Diffstat (limited to 'app')
| -rw-r--r-- | app/views/shared/_file_highlight.html.haml | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/app/views/shared/_file_highlight.html.haml b/app/views/shared/_file_highlight.html.haml index fba69dd0f3f..86921f0a777 100644 --- a/app/views/shared/_file_highlight.html.haml +++ b/app/views/shared/_file_highlight.html.haml @@ -4,7 +4,8 @@ - blob.data.lines.to_a.size.times do |index| - offset = defined?(first_line_number) ? first_line_number : 1 - i = index + offset - = link_to "#L#{i}", id: "L#{i}", rel: "#L#{i}" do + / We're not using `link_to` because it is too slow once we get to thousands of lines. + %a{href: "#L#{i}", id: "L#{i}", rel: "#L#{i}"} %i.fa.fa-link = i :preserve |
