Skip to content

Eliminate most N+1 queries loading UserController#calendar_activities

Stan Hu requested to merge sh-optimize-calendar-activities into master

We can reduce a significant number of queries by preloading the associations for events.

On GitLab.com, for a date that had 456 events, this brought the load time from 8.7 to 1.2 s.

Closes https://gitlab.com/gitlab-org/gitlab-ce/issues/58392

Merge request reports