Skip to content

Optimise creation of event invitations

Alex requested to merge 958-faster-event-invitations into master

Might close #958 (closed)

What does this MR do?

Improves the SQL insert requests when creating event invitations in a region with many members. This is done for 100 users at a time, but the $data array was filled more and more but never emptied. This might close the issue which is probably caused by the HTTP timeout.

How confident are you it won't break things if deployed?

Very sure, in the worst case it won't change anything

How to test

If you want to test it you need to increase the number of created foodsavers in the Seed command (https://gitlab.com/foodsharing-dev/foodsharing/-/blob/master/src/Dev/SeedCommand.php#L280) from 100 to at least 10000. That takes a few minutes until the seed finishes.

  1. Checkout branch locally
  2. Login as foodsaverthey are created.
  3. Go to the main region
  4. Create a new event

Checklist

  • added a test, or explain why one is not needed/possible...
  • no unrelated changes
  • asked someone for a code review
  • set a "for:" label to indicate who will be affected by this change
  • use "state:" labels to track this MR's state until it was beta tested
  • added an entry to CHANGELOG.md
  • add a short text that can be used in the release notes
  • Once your MR has been merged, you are responsible to create a testing issue in Beta Testing Repo:
    • Consider writing a detailed description in German.
    • Describe in a few sentences, what should be tested from a user perspective.
    • Also mention different settings (e.g. different browsers, roles, ...). how this change can be tested.
    • Be aware, that also non technical people should understand.

Release notes text

(A short text that will appear in the release notes and describes the change for non-technical people. Not always necessary, e.g. not for refactoring.)

Edited by Alex

Merge request reports