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

Navigation cache includes section summary data needlessly

XMLWordPrintable

    • MOODLE_20_STABLE, MOODLE_21_STABLE, MOODLE_22_STABLE
    • MOODLE_21_STABLE, MOODLE_22_STABLE, MOODLE_23_STABLE
    • 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.

      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.

            aolley Adam Olley
            aolley Adam Olley
            Sam Hemelryk Sam Hemelryk
            Dan Poltawski Dan Poltawski
            Rajesh Taneja Rajesh Taneja
            Votes:
            7 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved:

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