You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When installed on a site with a large number of cohorts, the plugin does not efficiently query them in the plugin settings, leading to very poor performance.
Performance issues are across most site administration pages since moodle tries to re-query the settings
The site in question has 165,652 cohorts
The actual xapi settings page tries to make a checkbox for each cohort. This takes ages to load each checkbox and is more or less unusable, and likely will crash browsers on lower spec machines
Version
master at 416b92cfd672e02e1c92b5011ee6395bb95a5111 on 2022101800
Steps to reproduce the bug
Enable profiling via site administration
Create a large number of cohorts
Profile the admin search page https://site.com/admin/search.php?PROFILEME=1
Check profiling run. In this site, the profiling run shows the following trace taking a large chunk of time:
The logstore_xapi_get_cohorts step takes ~10 seconds of execution time.
Expected behaviour
Plugin does not impact site performance unnecessarily
Actual behaviour
Admin page takes > 10 minutes to load.
It tries to make a checkbox for each cohort. If I let it run, it tries to make 100,000+ checkboxes.
Server information
Postgresql
Moodle 4.1
OS: Linux
I would recommend using recordsets to get the data, and refactoring the settings page to use a search/autocomplete box with multi select option.
The text was updated successfully, but these errors were encountered:
matthewhilton
changed the title
Performance issues in site administration
Sites with large numbers of cohorts cannot load settings page, very poor performance
Apr 24, 2023
Description
Version
master
at416b92cfd672e02e1c92b5011ee6395bb95a5111
on2022101800
Steps to reproduce the bug
https://site.com/admin/search.php?PROFILEME=1
The
logstore_xapi_get_cohorts
step takes ~10 seconds of execution time.Expected behaviour
Actual behaviour
Server information
I would recommend using recordsets to get the data, and refactoring the settings page to use a search/autocomplete box with multi select option.
The text was updated successfully, but these errors were encountered: