Skip to content

Resolve "Improve performance of Group Search API (advanced): merge_requests scope"

What does this MR do?

This MR adds some batch loaded attributes to the API::Entities::MergeRequestBasic to eliminate some N+1 queries that are done whenever the entity is being serialized without having its relationships preloaded.

By doing this work in the entity, we eliminate the need to eager load the associations if they are not used anywhere else but by the entity serializer.

Screenshots

Does this MR meet the acceptance criteria?

Conformity

Availability and Testing

Security

If this MR contains changes to processing or storing of credentials or tokens, authorization and authentication methods and other items described in the security review guidelines:

  • Label as security and @ mention @gitlab-com/gl-security/appsec
  • The MR includes necessary changes to maintain consistency between UI, API, email, or other methods
  • Security reports checked/validated by a reviewer from the AppSec team

Closes #221211 (closed)

Edited by Micaël Bergeron

Merge request reports