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.
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.
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.
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.)
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.)
I suspect that this is related to MDL-72246 which was fixed recently and will be part of the Moodle 3.11.6 release.
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.