Skip to content

Improve participants loading performance

What does this MR do and why?

We've introduced permission checks on every notes with !74906 (merged) (merged). However, it seems to have causing performance issues on MRs that have many notes. This MR skips checking system notes if the author has already been included as a participant to reduce the workload.

It changes participants behaviour slightly in that we only consider authors of system notes as a participant. I believe the only affected system notes would be assignee and reviewer assignments if they subsequently get unassigned straight away. They will still be considered as participants if they stay as assignee or reviewer or make any direct actions.

It makes most performance improvements in an Issue/MergeRequest that has lots of system notes from the same author. I saw a drop from ~10s to ~3s with an MR with 200+ notes.

MR acceptance checklist

This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.

Related to #355838 (closed)

Edited by Sincheol (David) Kim

Merge request reports