mirror of
https://github.com/wahyd4/gitlabhq.git
synced 2026-08-19 01:26:08 +10:00
Use less memory while counting lines
This commit is contained in:
@@ -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.
|
||||
|
||||
Reference in New Issue
Block a user