Skip to content
Snippets Groups Projects
Commit 9109619e authored by Jacob Vosmaer's avatar Jacob Vosmaer
Browse files

Use less memory while counting lines

parent 53ddb8f2
No related branches found
No related tags found
1 merge request!2451Send raw Git blobs via gitlab-workhorse
.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
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment