Preload project features in reference parser
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?
-
Changelog entry added, if necessary -
Documentation created/updated -
Tests added for this feature/bug -
Conforms to the code review guidelines -
Conforms to the merge request performance guidelines -
Conforms to the style guides -
Conforms to the database guides
Edited by Jan Provaznik