Skip to content

Refactor approval_rules association and caching some used methods

What does this MR do?

This MR tries to increase the performance of the MergeRequestsController#index (#198028 (closed)).

In this MR the approval_rules association in the MergeRequest model is improved to avoid some extra queries. The MR also has some other small improvements like caching some used methods.

Based on some specs with 20 MRs, 5 approval rules, and 10 approvals, the query count has been reduced by 61 queries. The improvement would change depending on the merge request configuration and data.

Does this MR meet the acceptance criteria?

Conformity

Refs #198028 (closed)

Merge request reports