Derive WikiPage#last_version from existing data
What does this MR do?
We query the Gitaly WikiGetPageVersions
RPC in a haml partial, which creates an N+1 problem #33951 (comment 232631025).
This MR instead derives the same "last version" Commit
using the data that is already loaded, avoiding the need to call Gitaly here.
Does this MR meet the acceptance criteria?
Conformity
- [-] Changelog entry
- [-] 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
Availability and Testing
- [-] Review and add/update tests for this feature/bug. Consider all test levels. See the Test Planning Process.
- [-] Tested in all supported browsers
Edited by 🤖 GitLab Bot 🤖