summaryrefslogtreecommitdiff
path: root/features
diff options
context:
space:
mode:
authorDouwe Maan <douwe@gitlab.com>2016-06-15 14:00:31 +0000
committerDouwe Maan <douwe@gitlab.com>2016-06-15 14:00:31 +0000
commit8bfbafbb6b2166d3709187cf6b1cb7ff5f627d52 (patch)
tree6f2a78770a7ebc32511a9084823730463c5fc771 /features
parenta95f8b9a82e79781dc99ff36d6ab5f9ba293ae52 (diff)
parentfce675d7fc7e408b3ec01a017a719c8cd036fa0d (diff)
downloadgitlab-ce-8bfbafbb6b2166d3709187cf6b1cb7ff5f627d52.tar.gz
Merge branch 'eager-loading-issue-parser' into 'master'
Eager load project relations in IssueParser ## What does this MR do? This changes the ReferenceParser class to eager load various associations. This in turn results in the permissions checking code (e.g. the `Ability` model) to _not_ run dozens if not hundreds of extra SQL queries depending on the amount of references involved (in a single document). ## Are there points in the code the reviewer needs to double check? No. ## Why was this MR needed? In !4410 it was revealed a _lot_ of a queries came from the `Ability` model and the code it would call. In many cases this was because the code would simply get a project, then get the owners; or get a group, then get some association of that. Eager loading these associations is a fairly simple solution and greatly cuts down the number of queries. ## What are the relevant issue numbers? None. ## Does this MR meet the acceptance criteria? - [x] [CHANGELOG](https://gitlab.com/gitlab-org/gitlab-ce/blob/master/CHANGELOG) entry added - [x] ~~[Documentation created/updated](https://gitlab.com/gitlab-org/gitlab-ce/blob/master/doc/development/doc_styleguide.md)~~ - [x] ~~API support added~~ - [ ] Tests - [x] ~~Added for this feature/bug~~ - [ ] All builds are passing - [x] Conform by the [style guides](https://gitlab.com/gitlab-org/gitlab-ce/blob/master/CONTRIBUTING.md#style-guides) - [ ] Branch has no merge conflicts with `master` (if you do - rebase it please) - [x] [Squashed related commits together](https://git-scm.com/book/en/Git-Tools-Rewriting-History#Squashing-Commits) See merge request !4675
Diffstat (limited to 'features')
0 files changed, 0 insertions, 0 deletions