Fix sub-optimal query batching
What does this MR do?
This introduces a new version of our batch-model loader that does not suffer from the sub-optimal batching seen in https://gitlab.com/gitlab-org/gitlab-ce/issues/66523
Does this MR meet the acceptance criteria?
Conformity
-
Changelog entry for user-facing changes, or community contribution. Check the link for other scenarios. -
Documentation created/updated or follow-up review issue created -
Code review guidelines -
Merge request performance guidelines -
Style guides -
Database guides -
Separation of EE specific content
Performance and Testing
This MR aims to improve performance by reducing the numbers of queries we need to issue.
-
Review and add/update tests for this feature/bug. Consider all test levels. See the Test Planning Process.