Improve issuable participants computation

What does this MR do and why?

Fetch system note authors separately so that we don't have to return every system note and load them into memory. This also saves us some CPU time as we skip parsing Markdown for these notes that could never have any user references.

This is helpful for issues / MRs with lots of system notes. A lot of the slow requests in https://gitlab.com/gitlab-org/gitlab/-/work_items/583451 are related to issues with a lot of system notes.

Queries

This is from an extreme example issue with lots of system notes: https://gitlab.com/gitlab-org/gitlab/-/work_items/365045

Before:

After:

References

https://gitlab.com/gitlab-org/gitlab/-/work_items/583451

MR acceptance checklist

Evaluate this MR against the MR acceptance checklist. It helps you analyze changes to reduce risks in quality, performance, reliability, security, and maintainability.

Related to #583451

Edited by Heinrich Lee Yu

Merge request reports

Loading