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

Course completion uses cache inefficiently

    XMLWordPrintable

    Details

    • Testing Instructions:
      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.
    • Affected Branches:
      MOODLE_30_STABLE, MOODLE_31_STABLE
    • Fixed Branches:
      MOODLE_30_STABLE, MOODLE_31_STABLE
    • Pull Master Branch:
      MDL-55628-master

      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

            Assignee:
            quen Sam Marshall
            Reporter:
            emerrill Eric Merrill
            Peer reviewer:
            Jonathan Champ
            Integrator:
            Dan Poltawski
            Tester:
            cameron1729
            Participants:
            Component watchers:
            Sam Marshall, Amaia Anabitarte, Carlos Escobedo, Ferran Recio, Sara Arjona (@sarjona), Matteo Scaramuccia, Andrew Nicols, Jun Pataleta, Michael Hawkins, Shamim Rezaie, Simey Lameze
            Votes:
            1 Vote for this issue
            Watchers:
            5 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved:
              Fix Release Date:
              12/Sep/16