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

Calendar: speedup loading context

    XMLWordPrintable

Details

    • Improvement
    • Status: Closed
    • Minor
    • Resolution: Not a bug
    • 3.9.14
    • None
    • Calendar, Course
    • MOODLE_39_STABLE

    Description

      We have closed MDL-60402: Calendar slow performance loading contexts with large number of courses

      The main reason for slow data loading is not using caching.

      We have 3 errors that cause the number of requests to the "context" table to double in proportion to the size of the table.

      First error in core_course_category::get_all(). The function gets all the required data in one request, but the "context" data is not used.

      The second error is in context_coursecat::instance($record). The record "$record" contains the "context", but does not use it, but requests it from the database, since it is not yet in the cache.

      The third error occurs using cache->set_many(). It also gets the context from the database, since it is not in the cache yet.

      Possible solution to the problem https://github.com/vel21ripn/moodle/commit/f72aa1fd377b034e029d62cf105674fac7be65f3

      Attachments

        Activity

          People

            Unassigned Unassigned
            vel21ripn Vitaly Lavrov
            David Woloszyn, Huong Nguyen, Jake Dallimore, Meirza, Michael Hawkins, Raquel Ortega, Safat Shahin, Stevani Andolo, Amaia Anabitarte, Carlos Escobedo, Laurent David, Mikel Martín Corrales, Sabina Abellan, Sara Arjona (@sarjona)
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: