Performance regression with /api/v4/groups/:id endpoint
GNOME reported in https://gitlab.gnome.org/Infrastructure/GitLab/issues/304 that after upgrading to 11.1.2, api/v4/groups/8
now times out for them.
The SQL profile is attached here:
The Grape summary is striking: lots of slow database and view calls:
{"time":"2018-07-30T13:08:49.503Z","severity":"INFO","duration":297476.54,"db":26246.86,"view":271229.68,"status":200,"method":"GET","path":"/api/v4/groups/8","params":{},"host":"gitlab.gnome.org","ip":"127.0.0.1","ua":null,"user_id":1,"username":"root"}
There are 414 calls to ProjectGroupLink
.
/cc: @tiagonbotelho, @DouweM