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

Performance improvements for user / group overrides for mod assign

XMLWordPrintable

    • MOODLE_37_STABLE, MOODLE_38_STABLE
    • MOODLE_38_STABLE
    • MDL-65797-Master
    • Hide

      Build a Moodle site with large number of user records, about 150 000 users   (In my case there are 570 000 users)

      1. Create a course
      2. Create two groups
      3. Enrol and Add around 100 users into each groups
      4. Create an assignment
      5. Create assignment override for each group
      6. Load the grading page (mod/assign/view.php?action=grading&id=...)
      7. The page is loaded really slow (around 1 minutes or more)
      8. Apply the patch
      9. Reload the page, it should be much faster (depends on the number of users in the course, not the whole site)
      Show
      Build a Moodle site with large number of user records, about 150 000 users   (In my case there are 570 000 users) Create a course Create two groups Enrol and Add around 100 users into each groups Create an assignment Create assignment override for each group Load the grading page (mod/assign/view.php?action=grading&id=...) The page is loaded really slow (around 1 minutes or more) Apply the patch Reload the page, it should be much faster (depends on the number of users in the course, not the whole site)

      At scale the hairy sql here performs really badly, eg minutes to load the grading UI:

      https://github.com/moodle/moodle/blob/master/mod/assign/gradingtable.php#L172-L236

      Some combination of sql rewrite or indexing needed.

       

        1. currentquery_plan.png
          currentquery_plan.png
          446 kB
        2. currentquery.png
          currentquery.png
          142 kB
        3. querywithuserlimit_plan.png
          querywithuserlimit_plan.png
          397 kB
        4. querywithuserlimit.png
          querywithuserlimit.png
          144 kB

            Nguyen Nathan Nguyen
            brendanheywood Brendan Heywood
            Dmitrii Metelkin Dmitrii Metelkin
            Eloy Lafuente (stronk7) Eloy Lafuente (stronk7)
            Eloy Lafuente (stronk7) Eloy Lafuente (stronk7)
            Votes:
            0 Vote for this issue
            Watchers:
            7 Start watching this issue

              Created:
              Updated:
              Resolved:

                Estimated:
                Original Estimate - 0 minutes
                0m
                Remaining:
                Remaining Estimate - 0 minutes
                0m
                Logged:
                Time Spent - 3 hours, 30 minutes
                3h 30m

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