Skip to content

Avoid Project N+1 on Elasticsearch Code results

Mario de la Ossa requested to merge avoid_n_plus_1_es_load_blobs into master

What does this MR do?

We currently have an N+1 loading Projects when viewing Code results (when Elasticsearch is enabled) due to this line in a view: https://gitlab.com/gitlab-org/gitlab-ee/blob/master/app/views/search/results/_blob.html.haml#L1

This MR loads all projects for the current results page into memory in order to have a single round-trip to the DB

What are the relevant issue numbers?

#9927 (closed)

Does this MR meet the acceptance criteria?

Edited by Michael Kozono

Merge request reports