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

get_context_info_array() calls get_record for courses instead of get_course

    XMLWordPrintable

Details

    • Improvement
    • Status: Development in progress
    • Minor
    • Resolution: Unresolved
    • 3.6.6, 3.7.2
    • None
    • Performance
    • MOODLE_36_STABLE, MOODLE_37_STABLE
    • MDL-67092-master
    • Hide

      This will be tested by CI and the performance testing servers

      For specific testing this requires reverting the commit and comparing the number of DB calls.
      One easy place to do so is on the front page of any assignment... but you may also need to revert MDL-67093.

      Show
      This will be tested by CI and the performance testing servers For specific testing this requires reverting the commit and comparing the number of DB calls. One easy place to do so is on the front page of any assignment... but you may also need to revert MDL-67093 .

    Description

      Often when calling get_coursemodule_from_id() we are already dealing with the current course - information which we already hold. However we always go and call $DB->get_record.

      On some pages, like forum, this can lead to at least 5, if not more, DB reads.

      Attachments

        Issue Links

          Activity

            People

              dobedobedoh Andrew Lyons
              dobedobedoh Andrew Lyons
              Matteo Scaramuccia, Andrew Lyons, Huong Nguyen, Jun Pataleta, Michael Hawkins, Shamim Rezaie, Simey Lameze
              Votes:
              1 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:

                Time Tracking

                  Estimated:
                  Original Estimate - Not Specified
                  Not Specified
                  Remaining:
                  Remaining Estimate - 0 minutes
                  0m
                  Logged:
                  Time Spent - 35 minutes
                  35m