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

fix_course_sortorder makes editing course slow when large number of courses

    XMLWordPrintable

    Details

    • Testing Instructions:
      Hide

      Testing for regressions:

      1. Update a course using /course/edit.php page without changing the category, make sure there are no errors and course is updated. This action should be faster than before patch (especially on big site with lots of categories and courses).
      2. Update a course using /course/edit.php with changing the category, make sure course is placed in the end of the course list in the new category.

      PS function update_course() is unfortunately not used on /course/manage.php page. Hopefully it will be after MDL-31830

      Show
      Testing for regressions: Update a course using /course/edit.php page without changing the category, make sure there are no errors and course is updated. This action should be faster than before patch (especially on big site with lots of categories and courses). Update a course using /course/edit.php with changing the category, make sure course is placed in the end of the course list in the new category. PS function update_course() is unfortunately not used on /course/manage.php page. Hopefully it will be after MDL-31830
    • Affected Branches:
      MOODLE_24_STABLE, MOODLE_25_STABLE
    • Fixed Branches:
      MOODLE_24_STABLE, MOODLE_25_STABLE
    • Pull Master Branch:
      wip-MDL-41517-master
    • Sprint:
      BACKEND Sprint 4

      Description

      We have a client with over 30K courses and when a course is edited there is a ~15s delay, almost all of which is spent in fix_course_sortorder. This is needless if the course category has not been changed on the edit form.

      I have a patch against 2.5.1 which allows course/edit.php to signal when the sortorder has not changed, but leaves the default action alone otherwise.

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              marina Marina Glancy
              Reporter:
              tworthington Thomas Worthington
              Peer reviewer:
              Rajesh Taneja
              Integrator:
              Damyon Wiese
              Tester:
              Michael de Raadt
              Participants:
              Component watchers:
              Amaia Anabitarte, Carlos Escobedo, Ferran Recio, Sara Arjona (@sarjona), Matteo Scaramuccia, Andrew Nicols, Jun Pataleta, Michael Hawkins, Shamim Rezaie, Simey Lameze
              Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved:
                Fix Release Date:
                11/Nov/13