Availability Restrictions Performance Issue

This forum post has been removed

Number of replies: 6
The content of this forum post has been removed and can no longer be accessed.
In reply to Deleted user

Re: Availability Restrictions Performance Issue

by Tim Hunt -
Picture of Core developers Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Peer reviewers Picture of Plugin developers

I think you are hitting the issue where your course has more sub-contexts than the CONTEXT_CACHE_MAX_SIZE constant (default value 2500) allows for, and that destroys performance.

Try adding something like

define('CONTEXT_CACHE_MAX_SIZE', 10000);

In your config.php file.

See https://docs.moodle.org/311/en/Performance_settings#config.php_settings_which_may_affect_performance or https://tracker.moodle.org/browse/MDL-73537 for more.

Average of ratings: Useful (3)
In reply to Tim Hunt

This forum post has been removed

The content of this forum post has been removed and can no longer be accessed.
In reply to Deleted user

This forum post has been removed

The content of this forum post has been removed and can no longer be accessed.
In reply to Deleted user

Re: Availability Restrictions Performance Issue

by Tim Hunt -
Picture of Core developers Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Peer reviewers Picture of Plugin developers
Note: to investigate issues like this, in addition to profiling, which is a very good move, the other tool is to turn on 'Display performance info' on Admin -> Development -> Debugging.

My guess as to the cause might have been wrong. It is just that what you said reminded me of that particular issue.

In the profiling you have shown, you ahve chopped off the table after one page full, and I am not sure it is showing what is really using the time in that. Try finding where most of the 'Excl CPU' is going.

It certainly is the case that after something has been edited, a critical cache is cleared, and it takes a significant time to rebuild on a big course. But, that should only affect the single next request (and other requests at about the same time will wait for that first one - there is a lock.)
Average of ratings: Useful (1)
In reply to Deleted user

Re: Availability Restrictions Performance Issue

by Andrew Lyons -
Picture of Core developers Picture of Moodle HQ Picture of Particularly helpful Moodlers Picture of Peer reviewers Picture of Plugin developers Picture of Testers
I suspect that this is related to MDL-72246 which was fixed recently and will be part of the Moodle 3.11.6 release.
Average of ratings: Useful (2)
In reply to Andrew Lyons

This forum post has been removed

The content of this forum post has been removed and can no longer be accessed.