Significantly reduce N+1 queries in /api/v4/todos endpoint
Compare changes
- Stan Hu authored
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 65 SQL queries. Closes https://gitlab.com/gitlab-org/gitlab-ce/issues/40378