Use less memory while counting lines
This commit is contained in:
parent
53ddb8f2cc
commit
9109619ee6
|
@ -1,7 +1,7 @@
|
|||
.file-content.code.js-syntax-highlight{ class: user_color_scheme }
|
||||
.line-numbers
|
||||
- if blob.data.present?
|
||||
- blob.data.lines.each_index do |index|
|
||||
- blob.data.each_line.each_with_index do |_, index|
|
||||
- offset = defined?(first_line_number) ? first_line_number : 1
|
||||
- i = index + offset
|
||||
-# We're not using `link_to` because it is too slow once we get to thousands of lines.
|
||||
|
|
Loading…
Reference in New Issue