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

Course cache is rebuild unnecessarily

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 2.4.5, 2.5.1
    • Fix Version/s: 2.4.6, 2.5.2
    • Component/s: Course
    • Labels:
    • Testing Instructions:
      Hide

      Prerequisites for both tests:

      1. Make sure you have several courses with activities in them and non-empty summary.
      2. Enable activity names filter (should be enabled by default)
      3. Set frontpage to display list of courses

      Test 1. Regressions:

      1. Enrol student in multiple courses
      2. View frontpage, /my/ page, individual courses, make sure there are no glitches.
      3. As teacher make changes to the course, view all courses pages again.

      Test 2. Performance:

      Significant performance improvement is noticeable on 2.5 and master since activity names filter was acting differently on 2.4

      1. Wait for 2 minutes (filters cache lifetime)
      2. Open the frontpage with the list of courses.
      3. Look at performance information, should be significantly less DB queries after the patch than before
      Show
      Prerequisites for both tests: Make sure you have several courses with activities in them and non-empty summary. Enable activity names filter (should be enabled by default) Set frontpage to display list of courses Test 1. Regressions: Enrol student in multiple courses View frontpage, /my/ page, individual courses, make sure there are no glitches. As teacher make changes to the course, view all courses pages again. Test 2. Performance: Significant performance improvement is noticeable on 2.5 and master since activity names filter was acting differently on 2.4 Wait for 2 minutes (filters cache lifetime) Open the frontpage with the list of courses. Look at performance information, should be significantly less DB queries after the patch than before
    • Affected Branches:
      MOODLE_24_STABLE, MOODLE_25_STABLE
    • Fixed Branches:
      MOODLE_24_STABLE, MOODLE_25_STABLE
    • Pull Master Branch:
      wip-MDL-41222-master

      Description

      If frontpage shows the list of courses and they have summaries, displaying the course summaries calls format_text which (if filters are not cached) calls acitivitynames filter which calls get_fast_modinfo($courseid).

      In this case course cache gets rebuilt unnecessarily

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                marina Marina Glancy
                Reporter:
                marina Marina Glancy
                Peer reviewer:
                Andrew Nicols
                Integrator:
                Dan Poltawski
                Tester:
                Sam Hemelryk
                Participants:
                Component watchers:
                Amaia Anabitarte, Carlos Escobedo, Ferran Recio, Sara Arjona (@sarjona), Víctor Déniz Falcón
              • Votes:
                0 Vote for this issue
                Watchers:
                3 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:
                  Fix Release Date:
                  9/Sep/13