Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Issue #3445409: Remove expensive entity loads for the event enrollments counter #3890

Merged
merged 1 commit into from
May 8, 2024

Conversation

bramtenhove
Copy link
Member

@bramtenhove bramtenhove commented May 6, 2024

Problem

The event page has an enrollments block with a counter of how many people enrolled. This counter is loading event enrollment entities which is unnecessary.

Screenshot 2024-05-06 at 10 08 46

When there are a lot of enrolments to an event the page becomes unnecessarily slow.

Solution

Add a simple flag loading just the IDs. This way implementations from others will not be affected.

Issue tracker

https://www.drupal.org/project/social/issues/3445409

Theme issue tracker

N/a

How to test

  • Go to an event with enrollments
  • Observe the counter is still correct

Screenshots

N/a

Release notes

The counter showing how many people were joining an event was loading an unnecessary amount of data. It now loads only what it needs.

Change Record

N/a

Translations

N/a

@bramtenhove bramtenhove added team: enterprise This PR originates from the ECI team status: needs review This pull request is waiting for a requested review type: performance Improve Open Social performance prio: medium labels May 6, 2024
@bramtenhove bramtenhove added this to the 12.4.2 milestone May 6, 2024
@bramtenhove bramtenhove force-pushed the issue/event-enrollments-count-only branch from 2e7fc8d to c12e19a Compare May 8, 2024 05:13
@bramtenhove bramtenhove modified the milestones: 12.4.2, 12.3.5 May 8, 2024
@bramtenhove bramtenhove merged commit 3699338 into main May 8, 2024
191 checks passed
@bramtenhove bramtenhove deleted the issue/event-enrollments-count-only branch May 8, 2024 06:44
@bramtenhove
Copy link
Member Author

Cherry-picked to 64b0f5e (12.4.x) and c936a06 (12.3.x)

@ronaldtebrake ronaldtebrake added the backport: verified This pull request has been back ported to an older minor version label May 21, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport: verified This pull request has been back ported to an older minor version prio: medium status: needs review This pull request is waiting for a requested review team: enterprise This PR originates from the ECI team type: performance Improve Open Social performance
Development

Successfully merging this pull request may close these issues.

2 participants