Significantly reduce N+1 queries in /api/v4/todos endpoint
Compare changes
+ 1
− 0
@@ -64,6 +64,7 @@ class Issue < ActiveRecord::Base
By preloading associations and batching issuable metadata lookups, we can significantly cut the number of SQL queries needed to load the Todos API endpoint.
On GitLab.com, my own tests showed my user's SQL queries went from 365 to under 60 SQL queries.