Eager load award emoji on notes and participants
What does this MR do?
Reduce the query count of the Issuable#show actions. I've create a MR and Issue both now have 108 notes on them, no award emoji, but even than without this MR it had 340+ queries. I've identified 2 problems:
- Award Emoji on notes were loaded only when rendering the discussion, thus for each one a query
- Participants queries the db once per note now too
Why was this MR needed?
N + 1 queries everywhere. 340+ queries should be lowered to below 100 at least.
What are the relevant issue numbers?
Should fix #18408 (closed), also @yorickpeterse @DouweM
Does this MR meet the acceptance criteria?
- 
CHANGELOG entry added 
- 
Documentation created/updated 
- 
Tests - 
Added for this feature/bug 
- 
All builds are passing 
 
- 
- 
Conform by the style guides 
- 
Branch has no merge conflicts with master(if you do - rebase it please)
- 
Squashed related commits together 
Progress
| Ref | Issue#show | MR#show | 
|---|---|---|
| master | 714 | 1182 | 
| a8be992b | 387 | unchanged | 
| 103e285c | unchanges | 1034 | 
The refs above are squashed together in 5b290fd, the head of this branch.