Batch projects in audit events controller index
What does this MR do and why?
We are facing issues with increase in CPU load while loading audit events streaming page for groups. Most likely it is because of fetching full_path
of all the projects of a group, and in case group has many projects, the CPU is facing spike.
Currently we are loading all the projects and their full_path in one go
@all_projects = group.all_projects_except_soft_deleted.map do |project|
{ value: project.full_path, text: project.name, type: "Projects" }
end
With this MR, we are trying to not fetch all the projects at once and process it in batches.
MR acceptance checklist
Please evaluate this MR against the MR acceptance checklist. It helps you analyze changes to reduce risks in quality, performance, reliability, security, and maintainability.
Screenshots or screen recordings
Screenshots are required for UI changes, and strongly recommended for all other merge requests.
Before | After |
---|---|
How to set up and validate locally
Numbered steps to set up and validate the change are strongly suggested.
Related to #437282 (closed)