Preload Ci::Pipeline data for Search API (Advanced): commits scope
Description
The Ci::Pipeline data (last_pipeline
and status) loaded in the [
CommitDetail` Entity](lib/api/entities/commit_detail.rb) is causing N+1 queries when search results are loaded. There was work done to attempt to address this in the attached MR but it does not appear to improve query performance. Perhaps there is another solution that would better preload the data using BatchLoader.
The following discussion from !35449 (merged) should be addressed:
-
@terrichu started a discussion: (+6 comments)
More details can be found in comment