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

Incredibly inefficient gradebook operations on moodle.org quiz in 2.8

    Details

    • Testing Instructions:
      Hide

      Make sure perf info is enabled in your footer.
      Apply the patch file "0001-Testing-MDL-47911.patch"

      Generate a XL sized test course (it will not take hours because I commented out the files/assignments/forum posts etc).

      Visit the course gradebook and record the db loads / page load time.

      Revert Erics commit for this issue (not the testing patch).

      Generate another XL sized test course.

      Visit the course gradebook and record the db loads / page load time.

      With this patch, the gradebook should load in under 2 mins, before this patch it will be just over 5 mins.

      Behat should also provide good coverage for regressions.

      Show
      Make sure perf info is enabled in your footer. Apply the patch file "0001-Testing- MDL-47911 .patch" Generate a XL sized test course (it will not take hours because I commented out the files/assignments/forum posts etc). Visit the course gradebook and record the db loads / page load time. Revert Erics commit for this issue (not the testing patch). Generate another XL sized test course. Visit the course gradebook and record the db loads / page load time. With this patch, the gradebook should load in under 2 mins, before this patch it will be just over 5 mins. Behat should also provide good coverage for regressions.
    • Affected Branches:
      MOODLE_28_STABLE
    • Fixed Branches:
      MOODLE_28_STABLE
    • Pull from Repository:
    • Pull Master Branch:
      MDL-47911-master
    • Sprint:
      Team ';drop tables Sprint 4
    • Issue size:
      Epic

      Description

      I am concerned to see so much gradebook stuff as part of this, that i'm creating this issue as an MDL rather than MDLSITE.

      Run ID	85f1a0541b4f204d551138b71137ef7e
      URL	/mod/quiz/view.php
      Date	28 October 2014, 03:05
      Execution time	224074.579 ms
      CPU time	122400.000 ms
      Function calls	24047008
      Memory used	6566 KB
      db reads/writes: 62755/119153
      

        Gliffy Diagrams

          Attachments

          1. 0001-NOBUG-This-is-test-code-to-generate-quizes-with-lots.patch
            7 kB
          2. 0001-Testing-MDL-47911.patch
            6 kB
          3. 27_quiz.pdf
            245 kB
          4. 27_xhprof.mpr
            85 kB
          5. 28_xhprof.mpr
            34 kB
          6. callgraph.png
            callgraph.png
            659 kB
          7. quiz_output.pdf
            326 kB

            Issue Links

              Activity

                People

                • Votes:
                  6 Vote for this issue
                  Watchers:
                  19 Start watching this issue

                  Dates

                  • Created:
                    Updated:
                    Resolved:
                    Fix Release Date:
                    9/Mar/15