fix #34510 add association preloading for issue boards
What does this MR do?
This should help to lower the average process time for the Boards::IssuesController#index
There were 4 cases of N+1 queries that made a substantial increase in the query count.
I also removed an unused serialized field (user
)
Are there points in the code the reviewer needs to double check?
I thought of using Note
scopes, namely inc_relations_for_view
but couldn't get it to work with #preload
.
If there is a better way than explicitly name each relation let me know.
Why was this MR needed?
The specified endpoint was slow, and part of the reason was high SQL timings.
Screenshots (if relevant)
Does this MR meet the acceptance criteria?
-
Changelog entry added, if necessary -
Documentation created/updated -
API support added -
Tests added for this feature/bug - Review
-
Has been reviewed by UX -
Has been reviewed by Frontend -
Has been reviewed by Backend -
Has been reviewed by Database
-
-
Conform by the merge request performance guides -
Conform by the style guides -
Squashed related commits together
What are the relevant issue numbers?
Closes #34510 (closed)
Edited by Micael Bergeron