diff options
author | Douwe Maan <douwe@gitlab.com> | 2016-07-28 22:53:56 +0000 |
---|---|---|
committer | Douwe Maan <douwe@gitlab.com> | 2016-07-28 22:53:56 +0000 |
commit | b9b0c0283a001010370741c2683e2fe400bf7599 (patch) | |
tree | d049dbc0d499cc31ca83efb0a33e2eda71b7797f /app/models/ability.rb | |
parent | a330b29b701b2de49206f864e654a01ad1a031c7 (diff) | |
parent | e4027e40707d8cde2c5326e99ae509b518a2190f (diff) | |
download | gitlab-ce-b9b0c0283a001010370741c2683e2fe400bf7599.tar.gz |
Merge branch 'fix/use-fewer-queries-for-mr-notes' into 'master'
Reduce number of queries made for merge_requests/:id/diffs
## What does this MR do?
It reduces the number of DB queries made while processing and rendering MR notes.
## Are there points in the code the reviewer needs to double check?
N/A
## Why was this MR needed?
For `https://staging.gitlab.com/gitlab-org/gitlab-ce/merge_requests/3142/diffs.json`, for each note we make number of DB queries, almost all of them are handled by the AR caching layer, but they seem to add up a few seconds. Testing on staging, calling `merge_requests/3142/diffs.json` was reduced to ~5.5 seconds from ~8 seconds.
## What are the relevant issue numbers?
N/A
## Screenshots (if relevant)
N/A
## Does this MR meet the acceptance criteria?
- [x] [CHANGELOG](https://gitlab.com/gitlab-org/gitlab-ce/blob/master/CHANGELOG) entry added
- [ ] ~~[Documentation created/updated](https://gitlab.com/gitlab-org/gitlab-ce/blob/master/doc/development/doc_styleguide.md)~~
- [ ] ~~API support added~~
- ~~Tests~~
- [ ] ~~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)
- [x] 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 !5551
Diffstat (limited to 'app/models/ability.rb')
0 files changed, 0 insertions, 0 deletions