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

Improve obtain_dynamic_data() performance

XMLWordPrintable

    • MOODLE_310_STABLE, MOODLE_311_STABLE, MOODLE_401_STABLE
    • 6

      Currently, in lib/modinfolib.php, we are having below functions that calling obtain_dynamic_data()

      - get_url
      - get_name
      - get_on_click
      - get_custom_data
      - get_icon_url
      - get_user_visible
      - is_visible_on_course_page
      - get_available
      - get_available_info
      - obtain_view_data
      

      Also, 

       

      mod_quiz_cm_info_dynamic()
      mod_lesson_cm_info_dynamic()
      mod_assign_cm_info_dynamic()
      

      will be called in obtain_dynamic_data() by

      $this->call_mod_function('cm_info_dynamic');
      

      So, we are having 2 problems here:

      1. The dynamic data loading is performing a lot of work here.
      2. Some functions, ex: get_on_click() does not need availability information in the obtain_dynamic_data(). So it would be good if we just calculate the availability information if necessary.

       

       

       

            peterburnett Peter Burnett
            huongn@moodle.com Huong Nguyen
            Votes:
            12 Vote for this issue
            Watchers:
            25 Start watching this issue

              Created:
              Updated:

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