PUT /api/:version/groups/:id/(-/)epics/:epic_iid executes almost 100 queries
I'm working on #30867 (closed). It will update the User#last_activity_on
field if not already updated on the same day. This adds a few queries and made rspec ee/spec/requests/api/epics_spec.rb:679
fail with Too many SQL queries were executed in PUT /api/:version/groups/:id/(-/)epics/:epic_iid(.:format): a maximum of 100 is allowed but 102 SQL queries were executed
.
The change in !21725 (merged) is expected to add 3 more queries so the endpoint is already on 99 queries.
The test adds some labels to an epic and each label seems to add 6 queries to the count. Maybe we can find a way to improve this.
Performance stats
Before optimization, we had 117 queries fired in the test. After optimization, 102
Edited by Tetiana Chupryna