BigW Consortium Gitlab
Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
G
gitlab-ce
Project
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
Forest Godfrey
gitlab-ce
Commits
e4c93382
Commit
e4c93382
authored
Jul 11, 2017
by
Rémy Coutable
Committed by
James Edwards-Jones
Jul 11, 2017
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Merge branch 'fix-n-plus-one-in-url-builder' into 'master'
Don't reload ActiveRecord objects when building note URLs Closes #34882 See merge request !12780
parent
d02bd514
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
7 additions
and
5 deletions
+7
-5
fix-n-plus-one-in-url-builder.yml
changelogs/unreleased/fix-n-plus-one-in-url-builder.yml
+4
-0
url_builder.rb
lib/gitlab/url_builder.rb
+3
-5
No files found.
changelogs/unreleased/fix-n-plus-one-in-url-builder.yml
0 → 100644
View file @
e4c93382
---
title
:
Improve issue rendering performance with lots of notes from other users
merge_request
:
author
:
lib/gitlab/url_builder.rb
View file @
e4c93382
...
...
@@ -52,15 +52,13 @@ module Gitlab
commit_url
(
id:
object
.
commit_id
,
anchor:
dom_id
(
object
))
elsif
object
.
for_issue?
issue
=
Issue
.
find
(
object
.
noteable_id
)
issue_url
(
issue
,
anchor:
dom_id
(
object
))
issue_url
(
object
.
noteable
,
anchor:
dom_id
(
object
))
elsif
object
.
for_merge_request?
merge_request
=
MergeRequest
.
find
(
object
.
noteable_id
)
merge_request_url
(
merge_request
,
anchor:
dom_id
(
object
))
merge_request_url
(
object
.
noteable
,
anchor:
dom_id
(
object
))
elsif
object
.
for_snippet?
snippet
=
Snippet
.
find
(
object
.
noteable_id
)
snippet
=
object
.
noteable
if
snippet
.
is_a?
(
PersonalSnippet
)
snippet_url
(
snippet
,
anchor:
dom_id
(
object
))
...
...
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