Skip to content

Improve merge request creation response time by performing more tasks asynchronously [RUN ALL RSPEC] [RUN AS-IF-FOSS]

Michael Kozono requested to merge mk/speed-up-merge-request-creation-action into master

What does this MR do?

Moves some merge request "after create" tasks to be performed asynchronously.

The MergeRequests::AfterCreateService was created in order to move one problematic bit of code into an async job. It was noticed that these items could probably be moved as well. That work was deferred to a follow up issue to avoid slowing iteration. Since GitLab.com is currently suffering from performance issues, this is now a priority.

Locally, the performance bar reports for pg:

  • Before: 397ms/111 queries
  • After: 140ms/84 queries

The timing and number of queries vary, but there is definitely some improvement.

This touches FOSS only. I'll look at moving EE items after this.

Related to #208812 (closed)

Related to #325672 (closed)

Related to #20801 (closed)

TODO

  • Remove query whitelisting which allows this endpoint to run over 100 queries

Does this MR meet the acceptance criteria?

Conformity

Availability and Testing

Edited by Michael Kozono

Merge request reports

Loading