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

Improve performance for regrading gradebook

XMLWordPrintable

    • MOODLE_28_STABLE
    • MOODLE_28_STABLE, MOODLE_29_STABLE
    • MDL-51498_regrade_perf
    • Hide

      First, creating a test course:

      • Generate a large couse with the following command:

        php admin/tool/generator/cli/maketestcourse.php --shortname=GRADEBOOKM --size=M --fixeddataset --filesizelimit=1024

      • For Assignment 1, grade ~300 users. I did this by doing the following:
        • Go to Assignment 1
        • Enable quick grading and change number of items to show per page to 100.
        • Pop open the browser console and enter the following and hit return (it will enter random grades for you):

          Y.all('.quickgradingform input[type=text]').each(function(n) { n.setAttribute('value', Math.floor(Math.random() * 101)) });

        • Click on Save changes. Repeat for the next 2 pages.
      • Go into the gradebook.
      • Add a new Category, I used Natural for the aggregation method.

      Be sure to enable performance info in the footer so you can see DB reads/writes.

      Trigger a regrade and note performance. The way I was doing this was with the following:

      • Go to the gradebook, and then Setup
      • Take note of the DB reads/writes.
      • Move Assignment 1 into the newly created category
      • Take note of increase in the DB reads/writes.
      Show
      First, creating a test course: Generate a large couse with the following command: php admin/tool/generator/cli/maketestcourse.php --shortname=GRADEBOOKM --size=M --fixeddataset --filesizelimit=1024 For Assignment 1, grade ~300 users. I did this by doing the following: Go to Assignment 1 Enable quick grading and change number of items to show per page to 100. Pop open the browser console and enter the following and hit return (it will enter random grades for you): Y.all('.quickgradingform input[type=text]').each(function(n) { n.setAttribute('value', Math.floor(Math.random() * 101)) }); Click on Save changes. Repeat for the next 2 pages. Go into the gradebook. Add a new Category, I used Natural for the aggregation method. Be sure to enable performance info in the footer so you can see DB reads/writes. Trigger a regrade and note performance. The way I was doing this was with the following: Go to the gradebook, and then Setup Take note of the DB reads/writes. Move Assignment 1 into the newly created category Take note of increase in the DB reads/writes.

      With very large courses (EG: thousands of students and hundreds of graded activities), the cost to regrade the gradebook is very high.

        1. minmax.patch
          1 kB
        2. profile.patch
          0.9 kB
        3. screenshot-1.png
          screenshot-1.png
          60 kB

            bushido Mark Nielsen
            bushido Mark Nielsen
            Marina Glancy Marina Glancy
            Dan Poltawski Dan Poltawski
            Frédéric Massart Frédéric Massart
            Votes:
            5 Vote for this issue
            Watchers:
            17 Start watching this issue

              Created:
              Updated:
              Resolved:

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