Skip to content
代码片段 群组 项目
提交 2fdd8982 编辑于 作者: Nick Thomas's avatar Nick Thomas
浏览文件

Merge branch 'sh-fix-issue-api-perf-n-plus-one' into 'master'

Eliminate cached N+1 queries for projects in Issue API

See merge request gitlab-org/gitlab-ce!19269
No related branches found
No related tags found
无相关合并请求
---
title: Eliminate cached N+1 queries for projects in Issue API
merge_request:
author:
type: performance
...@@ -16,7 +16,7 @@ def find_issues(args = {}) ...@@ -16,7 +16,7 @@ def find_issues(args = {})
args[:scope] = args[:scope].underscore if args[:scope] args[:scope] = args[:scope].underscore if args[:scope]
issues = IssuesFinder.new(current_user, args).execute issues = IssuesFinder.new(current_user, args).execute
.preload(:assignees, :labels, :notes, :timelogs) .preload(:assignees, :labels, :notes, :timelogs, :project)
issues.reorder(args[:order_by] => args[:sort]) issues.reorder(args[:order_by] => args[:sort])
end end
......
0% 加载中 .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册