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
1
Merge Requests
1
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
gitlab-ce
Commits
5827507e
Commit
5827507e
authored
Jan 15, 2018
by
Matija Čupić
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Use preload instead of includes to avoid joins
parent
70fdc076
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
2 additions
and
2 deletions
+2
-2
lib/api/jobs.rb
lib/api/jobs.rb
+1
-1
lib/api/v3/builds.rb
lib/api/v3/builds.rb
+1
-1
No files found.
lib/api/jobs.rb
View file @
5827507e
...
@@ -38,7 +38,7 @@ module API
...
@@ -38,7 +38,7 @@ module API
builds
=
user_project
.
builds
.
order
(
'id DESC'
)
builds
=
user_project
.
builds
.
order
(
'id DESC'
)
builds
=
filter_builds
(
builds
,
params
[
:scope
])
builds
=
filter_builds
(
builds
,
params
[
:scope
])
builds
=
builds
.
includes
(
:user
,
:job_artifacts_archive
,
:runner
,
pipeline: :project
)
builds
=
builds
.
preload
(
:user
,
:job_artifacts_archive
,
:runner
,
pipeline: :project
)
present
paginate
(
builds
),
with:
Entities
::
Job
present
paginate
(
builds
),
with:
Entities
::
Job
end
end
...
...
lib/api/v3/builds.rb
View file @
5827507e
...
@@ -36,7 +36,7 @@ module API
...
@@ -36,7 +36,7 @@ module API
builds
=
user_project
.
builds
.
order
(
'id DESC'
)
builds
=
user_project
.
builds
.
order
(
'id DESC'
)
builds
=
filter_builds
(
builds
,
params
[
:scope
])
builds
=
filter_builds
(
builds
,
params
[
:scope
])
builds
=
builds
.
includes
(
:user
,
:job_artifacts_archive
,
:runner
,
pipeline: :project
)
builds
=
builds
.
preload
(
:user
,
:job_artifacts_archive
,
:runner
,
pipeline: :project
)
present
paginate
(
builds
),
with:
::
API
::
V3
::
Entities
::
Build
present
paginate
(
builds
),
with:
::
API
::
V3
::
Entities
::
Build
end
end
...
...
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