Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
gitlab-ce
Commits
9a50db69
Commit
9a50db69
authored
Jun 05, 2015
by
Douwe Maan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix timeout when rendering file with thousands of lines.
parent
3f59a8f0
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
3 additions
and
1 deletion
+3
-1
CHANGELOG
CHANGELOG
+1
-0
app/views/shared/_file_highlight.html.haml
app/views/shared/_file_highlight.html.haml
+2
-1
No files found.
CHANGELOG
View file @
9a50db69
Please view this file on the master branch, on stable branches it's out of date.
Please view this file on the master branch, on stable branches it's out of date.
v 7.12.0 (unreleased)
v 7.12.0 (unreleased)
- Fix timeout when rendering file with thousands of lines.
- Don't notify users mentioned in code blocks or blockquotes.
- Don't notify users mentioned in code blocks or blockquotes.
- Omit link to generate labels if user does not have access to create them (Stan Hu)
- Omit link to generate labels if user does not have access to create them (Stan Hu)
- Disable changing of the source branch in merge request update API (Stan Hu)
- Disable changing of the source branch in merge request update API (Stan Hu)
...
...
app/views/shared/_file_highlight.html.haml
View file @
9a50db69
...
@@ -4,7 +4,8 @@
...
@@ -4,7 +4,8 @@
-
blob
.
data
.
lines
.
to_a
.
size
.
times
do
|
index
|
-
blob
.
data
.
lines
.
to_a
.
size
.
times
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
=
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
.fa.fa-link
=
i
=
i
:preserve
:preserve
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment