summaryrefslogtreecommitdiff
path: root/lib/omni_auth
diff options
context:
space:
mode:
authorAlejandro Rodríguez <alejorro70@gmail.com>2016-06-06 16:19:39 -0400
committerAlejandro Rodríguez <alejorro70@gmail.com>2016-06-08 10:26:05 -0400
commitfade1a4cdebb4124048e9764486812627333ff95 (patch)
treeb8911fb45861a1019f3724b74fffeca765fcc2d0 /lib/omni_auth
parentad83c3085513dd248b979d445e545e88a17c6ebc (diff)
downloadgitlab-ce-fade1a4cdebb4124048e9764486812627333ff95.tar.gz
Fix pseudo n+1 queries with Note and Note Authors in issuables APIs
This was not a clear cut n+1 query, given that if you're directly subscribed to all issues that the API is returning you never really need to check for the notes. However, if you're subscribed to _all_ of them, then for each issuable you need to go once to `notes`, and once to `users` (for the authors). By preemtively loading notes and authors, at worst you have 1 extra query, and at best you saved 2n extra queries. We also took advantage of this preloading of notes when counting user notes.
Diffstat (limited to 'lib/omni_auth')
0 files changed, 0 insertions, 0 deletions