Optimize maximum user access level lookup in loading of notes
What does this MR do?
Optimize maximum user access level of lookup in loading of notes
Are there points in the code the reviewer needs to double check?
Check the permission checks.
Why was this MR needed?
NotesHelper#note_editable?
and ProjectTeam#human_max_access
currently take about 16% of the load time of an issue page. This MR preloads the maximum access level of users for all notes in issues and merge requests with several queries instead of one per user and caches the result in RequestStore.
What are the relevant issue numbers?
#15670 (moved), #19273 (closed)
Does this MR meet the acceptance criteria?
-
CHANGELOG entry added - 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