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

Course completion uses cache inefficiently

    XMLWordPrintable

Details

    • MOODLE_30_STABLE, MOODLE_31_STABLE
    • MOODLE_30_STABLE, MOODLE_31_STABLE
    • MDL-55628-master
    • Hide

      Note: This test is just a quick one to exercise the completion cache a little and make sure we didn't break it. It already passed before the change, as well as after.

      1. Enable completion tracking (for server and a test course).
      2. On a course, create a Page object. Under completion options, set it so that students can manually mark it complete.
      3. Create a second Page object. Set this one so it is automatically marked complete when viewed. (Use 'save and return to course' so as not to view it yet)
      4. Turn editing off.
      EXPECTED: Both checkboxes should be visible but not ticked.
      5. Tick the checkbox next to the first Page.
      EXPECTED: The checkbox appears ticked.
      6. Reload the page.
      EXPECTED: The checkbox still appears ticked.
      7. Click into the second Page, then click back to the course page.
      EXPECTED: Both checkboxes are now ticked.

      Show
      Note: This test is just a quick one to exercise the completion cache a little and make sure we didn't break it. It already passed before the change, as well as after. 1. Enable completion tracking (for server and a test course). 2. On a course, create a Page object. Under completion options, set it so that students can manually mark it complete. 3. Create a second Page object. Set this one so it is automatically marked complete when viewed. (Use 'save and return to course' so as not to view it yet) 4. Turn editing off. EXPECTED: Both checkboxes should be visible but not ticked. 5. Tick the checkbox next to the first Page. EXPECTED: The checkbox appears ticked. 6. Reload the page. EXPECTED: The checkbox still appears ticked. 7. Click into the second Page, then click back to the course page. EXPECTED: Both checkboxes are now ticked.

    Description

      From discussion at the tail of MDL-53208, it was discovered that completion_info uses the static cache store pretty inefficiently, and causes a lot of unserialize calls.

      The problem boils down to the fact that completion_info uses a 'complex' data storage method in the cache, and the cache API has to make certain assumptions that may not be necessary for this particular case.

      Attachments

        Activity

          People

            quen Sam Marshall
            emerrill Eric Merrill
            Jonathan Champ Jonathan Champ
            Dan Poltawski Dan Poltawski
            cameron1729 cameron1729
            Amaia Anabitarte, Bas Brands, Carlos Escobedo, Laurent David, Raquel Ortega, Sabina Abellan, Sara Arjona (@sarjona), Matteo Scaramuccia, David Woloszyn, Huong Nguyen, Jake Dallimore, Michael Hawkins, Stevani Andolo
            Votes:
            1 Vote for this issue
            Watchers:
            5 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:
              12/Sep/16