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

3.11 Dashboard Loads Slowly (30 seconds)

XMLWordPrintable

    • MOODLE_311_STABLE
    • MOODLE_311_STABLE
    • MDL-72246-master-2
    • Hide

      Before applying a patch:

      1. Restore attached course to Moodle 3.11+ and enrol student to it
      2. Login as student.
      3. Go to the My courses (master) / Dashboard (311)
      4. Open network tab in browser developer tools
      5. Purge caches
      6. Reload the "My courses" / "Dashboard" page.
      7. Observe it takes ~30 sec to load courses. Slowest request is lib/ajax/service.php?sesskey=Rc5t54LciN&info=core_course_get_enrolled_courses_by_timeline_classification

      Apply patch and do steps 2-5 (don't forget to purge caches). Ensure dashboard loads much faster in less than 5 sec

      Show
      Before applying a patch: Restore attached course to Moodle 3.11+ and enrol student to it Login as student. Go to the My courses (master) / Dashboard (311) Open network tab in browser developer tools Purge caches Reload the "My courses" / "Dashboard" page. Observe it takes ~30 sec to load courses. Slowest request is lib/ajax/service.php?sesskey=Rc5t54LciN&info=core_course_get_enrolled_courses_by_timeline_classification Apply patch and do steps 2-5 (don't forget to purge caches). Ensure dashboard loads much faster in less than 5 sec
    • Moppies Kanban

      Upgraded to 3.11 and now noticing the dashboard is loading very slowly at times. I have the dashboard set to display 12 courses.

      Using MySQL 8.0, checking "htop" I see that MySQL is the most active process when I run the tests.

      Using the "inspector" in the browser, I narrowed the area that takes the longest to return.

      https://[mymoodle]/lib/ajax/service.php?sesskey=Vsvzu2sm2d&info=core_course_get_enrolled_courses_by_timeline_classification

      I tested it by purging cache in another browser before logging in. After the slow load, the next reload of the page is very quick. It seems that the cache works for some time. After accessing a few courses and then later on returning to the dashboard, I again see a slow loading time of 30 seconds. 

      Prior to the upgrade, this page took less than 1 second to load.

      I also removed all the analytics code we have in Additional HTML to ensure that wasn't the source of any issue, and it made no difference.

      STEPS TO RECREATE:

      1. Activity completion must be enabled in multiple courses.
      2. The courses should have a number of activities that are tracking completion.
      3. The role should be a Student (or Teacher who also has the role of student in the courses).
      4. Clear the site cache.
      5. Log in as the user with a few (more than 3) courses that have completion tracking enabled.
      6. Wait up to 30 seconds for the dashboard to appear.

      It is really prevalent in our users who are doing content creation in multiple classes. They have completion tracking enabled, they are connected with multiple courses, and sometimes they assume the role of student in order to test things out.

      However, if a student happens to be enrolled in a few of these courses, their dashboard takes over 10 seconds to display each time they log in and each time they complete activities.

        1. 2021-07-29_LI (2).jpg
          2021-07-29_LI (2).jpg
          4.23 MB
        2. 6ec4c7932e50dfff6cac00a13f199b3e.mpr
          92 kB
        3. 72246-change.png
          72246-change.png
          120 kB
        4. afterpatch.png
          afterpatch.png
          95 kB
        5. b4706a30fae210ae7d98671f3af73d17.mpr
          91 kB
        6. backup-moodle2-course-17-rekenregels_8-20211216-0915.mbz
          33.86 MB
        7. back-up-moodle2-course-98-rekenregels_8-20210920-1028-nu.mbz
          48.08 MB
        8. bb95aa083cb7bce2e4c4a01574162421.mpr
          94 kB
        9. beforepatch.png
          beforepatch.png
          127 kB
        10. callstack.png
          callstack.png
          2.19 MB
        11. MDL-72246_master_after.png
          MDL-72246_master_after.png
          155 kB
        12. MDL-72246_master_before.png
          MDL-72246_master_before.png
          143 kB
        13. MDL-72246_v311_after.png
          MDL-72246_v311_after.png
          239 kB
        14. MDL-72246_v311_before.png
          MDL-72246_v311_before.png
          232 kB

            dobedobedoh Andrew Lyons
            tallthom Thom Rawson
            Ilya Tregubov Ilya Tregubov
            Jun Pataleta Jun Pataleta
            Angelia Dela Cruz Angelia Dela Cruz
            Votes:
            21 Vote for this issue
            Watchers:
            34 Start watching this issue

              Created:
              Updated:
              Resolved:

                Estimated:
                Original Estimate - 0 minutes
                0m
                Remaining:
                Remaining Estimate - 0 minutes
                0m
                Logged:
                Time Spent - 1 week, 2 days, 6 hours, 41 minutes
                1w 2d 6h 41m

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