Uploaded image for project: 'Moodle'
  1. Moodle
  2. MDL-84844

mod_subsection slows down course editing operations

XMLWordPrintable

      On our big instance we discovered that courses with at least one instance of mod_subsection have performance issues when editing operations are being done. The performance issues become worse the more instances of mod_subsection the course has.

      On our instance with 4.9 million entries in the course_sections table we discovered the following slow query in our DB monitoring:

      select id, name from mdl_course_sections where component = ? and itemid = ?

      which takes 2 seconds. This is being called in mod/subsection/lib.php in function subsection_get_coursemodule_info.

      This seems to be called for every subsection instance and each time the course modinfo cache is being re-created which slows down all course editing operations (correct me if I'm wrong). So in a plain course in our production system with 7 subsections it takes 30 seconds to add the 8th subsection for example.

        1. MDL-84844.png
          312 kB
          Ron Carl Alfon Yu

            phmemmel PhMemmel
            phmemmel PhMemmel
            Stefan Hanauska Stefan Hanauska
            Jun Pataleta Jun Pataleta
            Ron Carl Alfon Yu Ron Carl Alfon Yu
            Votes:
            6 Vote for this issue
            Watchers:
            13 Start watching this issue

              Created:
              Updated:
              Resolved:

                Estimated:
                Original Estimate - 0 minutes
                0m
                Remaining:
                Remaining Estimate - 0 minutes
                0m
                Logged:
                Time Spent - 56 minutes
                56m

                  Error rendering 'clockify-timesheets-time-tracking-reports:timer-sidebar'. Please contact your Jira administrators.