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

Performance and usability improvements in class cm_info

    XMLWordPrintable

Details

    • Improvement
    • Status: Closed
    • Blocker
    • Resolution: Fixed
    • 2.6
    • 2.6
    • Course
    • MOODLE_26_STABLE
    • MOODLE_26_STABLE
    • wip-MDL-41192-master
    • Hide

      Must be no regressions and performance improvement in the following cases:

      1. Enable completion and conditional availability (otherwise there are no extra queries and therefore no performance improvements)
      2. Make course display one section per page
      3. If section A has activities with conditional availability and user views section B, the availability of unshown activities is not calculated.
      4. Same with viewing /my/ page - you should see the performance improvement, especially if MAX_MODINFO_CACHE_SIZE is less than number of courses displayed on the page.
      5. Same with overview pages mod/xxxx/index.php
      Show
      Must be no regressions and performance improvement in the following cases: Enable completion and conditional availability (otherwise there are no extra queries and therefore no performance improvements) Make course display one section per page If section A has activities with conditional availability and user views section B, the availability of unshown activities is not calculated. Same with viewing /my/ page - you should see the performance improvement, especially if MAX_MODINFO_CACHE_SIZE is less than number of courses displayed on the page. Same with overview pages mod/xxxx/index.php
    • BACKEND Sprint 4

    Description

      Classes cm_info should not perform any calculations/requests in constructor, all properties should be read-only and those that need calculations have getters methods so they are calculated on the first request only.

      What it saves: when we call get_fast_modinfo() for the whole course but only actually need one activity (or only activities in one sections, activities of particular type, etc.), the other activities' visibility is not calculated. At the moment it can be expensive if conditions or groups are used.

      Attachments

        Issue Links

          Activity

            People

              marina Marina Glancy
              marina Marina Glancy
              Rajesh Taneja Rajesh Taneja
              Sam Hemelryk Sam Hemelryk
              Rossiani Wijaya Rossiani Wijaya
              Amaia Anabitarte, Carlos Escobedo, Laurent David, Mikel Martín Corrales, Sabina Abellan, Sara Arjona (@sarjona)
              Votes:
              0 Vote for this issue
              Watchers:
              6 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:
                18/Nov/13