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

assign::grading_disabled() should be more efficient.

    XMLWordPrintable

Details

    • Improvement
    • Status: Closed
    • Minor
    • Resolution: Fixed
    • 3.11
    • 4.0
    • Assignment
    • MOODLE_311_STABLE
    • MOODLE_400_STABLE
    • Hide

      Before the patch

      1. Go to Site Administration > Development > Debugging and turn "Performance info" on.
      2. Go to Site Administration > Development > Make test course and create an L sized test course.
      3. Enter an assignment and hit the "View all submissions" link to view the grading page.
      4. At the bottom of the page, under "options" set Assignments per page to "all"
      5. Further down the bottom of the page where the performance debug output is displayed, notes the DB reads.

      After the patch

      1. Repeat steps 1-5 of the "Before the patch" section.
      2. Confirm DB reads are lower than the number before the patch.
      Show
      Before the patch Go to Site Administration > Development > Debugging and turn "Performance info" on. Go to Site Administration > Development > Make test course and create an L sized test course. Enter an assignment and hit the "View all submissions" link to view the grading page. At the bottom of the page, under "options" set Assignments per page to "all" Further down the bottom of the page where the performance debug output is displayed, notes the DB reads. After the patch Repeat steps 1-5 of the "Before the patch" section. Confirm DB reads are lower than the number before the patch.

    Description

      When viewing all submissions in an assignment, the function grading_disabled is called twice for each user and seems responsible for up to 40% of the db queries on the page (after MDL-72052 and MDL-72054 are fixed) - just to return a boolean "true/false" - we should make it more efficient.

      Attachments

        1. after_applying_patch.png
          49 kB
          Sujith Haridasan
        2. before_applying_patch.png
          48 kB
          Sujith Haridasan
        3. MDL-72097_After Patch.png
          72 kB
          Angelia Dela Cruz
        4. MDL-72097_Before Patch.png
          70 kB
          Angelia Dela Cruz

        Issue Links

          Activity

            People

              danmarsden Dan Marsden
              danmarsden Dan Marsden
              Sujith Haridasan Sujith Haridasan
              Víctor Déniz Falcón Víctor Déniz Falcón
              Angelia Dela Cruz Angelia Dela Cruz
              Adrian Greeve, Jake Dallimore, Mathew May, Mihail Geshoski, Sujith Haridasan
              Votes:
              0 Vote for this issue
              Watchers:
              6 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:
                19/Apr/22

                Time Tracking

                  Estimated:
                  Original Estimate - Not Specified
                  Not Specified
                  Remaining:
                  Remaining Estimate - 0 minutes
                  0m
                  Logged:
                  Time Spent - 1 hour
                  1h