Skip to content

Preload project features in reference parser

Jan Provaznik requested to merge load_project_features into master

What does this MR do?

Preloading of project_features mitigates N+1 queries when checking references in other projects.

When loading projects for resources referenced in comments it makes sense to include also associated project_features because in the following step (can_read_reference?(user, projects[node], node)) project features is used for checking permissions for the given project.

What are the relevant issue numbers?

Fixes #43094 (closed) (I'm not sure if this is a complete fix though - there may be different N+1 issues for other resources)

Does this MR meet the acceptance criteria?

Edited by Jan Provaznik

Merge request reports