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

Navigation cache includes section summary data needlessly

    XMLWordPrintable

    Details

    • Testing Instructions:
      Hide

      1. Create a summary with a huge chunk of text (large enough to notice the size difference when viewing session size).
      2. View the course with that summary and note the size of your session (either on disk or in mdl_sessions if dbsessions is enabled).
      3. Apply the fix, logout to get a new session and relogin and view the same page. Note the new size of the session is smaller.
      4. Check navigation block still works as expected on the course node.

      If you feel like inspecting the sessions themselves, base64_decode them and note that prior to fix, summary data is included and after, it is not.

      Show
      1. Create a summary with a huge chunk of text (large enough to notice the size difference when viewing session size). 2. View the course with that summary and note the size of your session (either on disk or in mdl_sessions if dbsessions is enabled). 3. Apply the fix, logout to get a new session and relogin and view the same page. Note the new size of the session is smaller. 4. Check navigation block still works as expected on the course node. If you feel like inspecting the sessions themselves, base64_decode them and note that prior to fix, summary data is included and after, it is not.
    • Affected Branches:
      MOODLE_20_STABLE, MOODLE_21_STABLE, MOODLE_22_STABLE
    • Fixed Branches:
      MOODLE_21_STABLE, MOODLE_22_STABLE, MOODLE_23_STABLE
    • Pull from Repository:
    • Pull Master Branch:

      Description

      When building the navigation cache, navigationlib stores section data in the cache. It does this by making a call to get_all_sections and storing the entire section data in the cache. This includes the 'summary' field. The summary of a section can be quite large, huge chunks of text and html markup. This can blow up the session data size quite a bit (especially if you have embedded images for example).

      The fix for this is simple, unset the summary field for each section before entering it into the cache, no part of the navigation cache needs the summary data.

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              aolley Adam Olley
              Reporter:
              aolley Adam Olley
              Peer reviewer:
              Sam Hemelryk
              Integrator:
              Dan Poltawski
              Tester:
              Rajesh Taneja
              Participants:
              Component watchers:
              Adrian Greeve, Jake Dallimore, Mathew May, Mihail Geshoski, Peter Dias
              Votes:
              7 Vote for this issue
              Watchers:
              2 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved:
                Fix Release Date:
                9/Jul/12