Use less memory while counting lines
This commit is contained in:
parent
53ddb8f2cc
commit
9109619ee6
1 changed files with 1 additions and 1 deletions
|
@ -1,7 +1,7 @@
|
||||||
.file-content.code.js-syntax-highlight{ class: user_color_scheme }
|
.file-content.code.js-syntax-highlight{ class: user_color_scheme }
|
||||||
.line-numbers
|
.line-numbers
|
||||||
- if blob.data.present?
|
- 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
|
- offset = defined?(first_line_number) ? first_line_number : 1
|
||||||
- i = index + offset
|
- i = index + offset
|
||||||
-# We're not using `link_to` because it is too slow once we get to thousands of lines.
|
-# We're not using `link_to` because it is too slow once we get to thousands of lines.
|
||||||
|
|
Loading…
Reference in a new issue