N+1 queries with API /projects/:project_id/events endpoint
From https://gitlab.com/gitlab-com/infrastructure/issues/3534#note_54194851, one of the most commonly used API endpoints is the /projects/:project_id/events
. We seem to have a number of N+1 queries:
- SQL: http://profiler.gitlap.com/20180111/9eff77d1-3147-4241-a0a9-e03880844cc3.txt.gz
- ruby-prof: http://profiler.gitlap.com/20180111/9eff77d1-3147-4241-a0a9-e03880844cc3.html.gz
p99 performance seems to have gotten worse here too:
Edited by Stan Hu