Skip to content

Performance degradation due to Calendar sync observers in local_o365 #3179

@moodleulpgc

Description

@moodleulpgc

Hi, we at ULPGC are using moodle 4.5.10 and 4.5.11 on sites with 20000 users and 3000 courses. We have all courses synced to Teams: setting local_o365 | coursesync set to all features enabled.
We are experiencing a significant performance degradation in moodle due to connection to azure/o365.
Updating an existing activity can take up to 2-3 min. Even simply making an activity or section hidden/visible takes minutes, not seconds. The delay depends on the number or enroled users in the course. There is no penalty in test courses with a couple of students.

We have traced the problem to the observers in local/o365/classes/feature/calsync/observers.php for
calendar_event_created
calendar_event_updated
calendar_event_deleted
If we disable (return true immediately upon calling) those methods, there is no delay in moodle operations. When active, the update of a course_module is delayed because events syncing with outlook calendar. The delay can be of several minutes, unusable.

These is a setting in Microsoft block plugin (also installed) to control syncing with Outlook calendar; block_microsoft | settings_showoutlooksync. But these observers belong to local_o365 and do not follow that setting

We miss a setting in local_o365 to disable or configure the event synchronization with Outlook calendar directly there, in local_o365.

Technically, the observer action is quite time consuming, thus a problem if executed synchronously. Better to create and store an adhoc task than can be executed separately in backend, avoiding delays in response to user interface.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions