Remove N+1 issue in Wiki pages overview
Problem
We query the Gitaly WikiGetPageVersions
RPC in a haml partial for the /-/wikis/pages
endpoint, which creates an N+1 problem #33951 (comment 232631025).
Proposal
- Replace the individual
WikiGetPageVersions
call with oneListLastCommitsForTree
call. - Create correct
WikiPageVersion
objects based on these commits, and attach them to theirWikiPage
objects.
Testing Activity
- Ensure queries is no longer N+1
Edited by Markus Koller