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

get_context_info_array() calls get_record for courses instead of get_course

XMLWordPrintable

    • Icon: Improvement Improvement
    • Resolution: Unresolved
    • Icon: Minor Minor
    • None
    • 3.6.6, 3.7.2
    • 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 .

      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.

            Unassigned Unassigned
            dobedobedoh Andrew Lyons
            Votes:
            1 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:

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

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