-
Improvement
-
Resolution: Unresolved
-
Minor
-
None
-
4.3.5, 4.4, 4.5
The workshop activity module has a performance issue related to its method, get_users_with_capability_sql, which generates a poorly optimized SQL query. Currently, it uses a UNION to combine SQL queries, but this could be improved by implementing simple caching and avoiding complex UNION queries.
For instance, when there are 1000 groups, loading content becomes significantly slow and may even result in a 504 error due to timeout. I have attached a text file containing a SQL query which spans 15,000 lines, along with an optimized version of the SQL. Initially, I encountered a different problem that I couldn't replicate locally, but this example is the closest scenario I've managed to recreate the issue.
Testing instructions:
- Create a large test course.
- Create Grouping
- Create Groups using auto-create groups.
- Set Group/member count to 1000.
- Select Grouping of auto-created groups, previously created grouping.
- Create Workshop activity module.
- Common module settings > Group mode : Separate groups.
- Common module settings > Grouping : Select previously created grouping.
- Save and display.
Actual results without the optimization:
Workshop activity module is not loading and throwing 504 error, or it takes a lot of time to load a content
Actual results with the optimization:
Workshop activity module loads faster.
Expected results:
Workshop activity module should load
- has been marked as being related by
-
MDL-71433 Having trouble performing certain actions with courses with more than 65,000 participants.
- Open