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

Performance issues with filters applied to course/category titles in navigation

    XMLWordPrintable

Details

    • MOODLE_311_STABLE, MOODLE_35_STABLE, MOODLE_36_STABLE, MOODLE_37_STABLE, MOODLE_38_STABLE, MOODLE_39_STABLE, MOODLE_400_STABLE
    • MOODLE_311_STABLE
    • MDL-67428-filter-context
    • Hide

      Prerequisites:

      1) Visit Site Administration -> Debugging settings at /admin/settings.php?section=debugging

      • Enable 'Performance info'

      2) Visit Site Administration -> Plugins -> Filters -> Manage filters

      • Ensure 'Activity names auto linking' and 'Display H5P' are both on
      • Switch both of these filters to apply to 'Content and headings'

       

      Testing

      1. Visit Site Administration->Course->Course and category management - /course/management.php
      2. Click Create new Category
      3. Ensure Parent Category is the default 'Category 1'
      4. Name this 'Subcategory 1' and click Create category
      5. Click Create new Category again
      6. Ensure parent category is 'Subcategory 1'
      7. Name this category 'Subcategory 2' and click Create category
      8. Click Create new course
      9. Ensure the category is within Subcategory 2
      10. Fill the form in with 'test' as the name and shortname, then click Save and Return
      11. View the performance footer, and take note of the amount of 'Contexts for which filters were loaded' such as 9
      12. In another tab, open Site Administration->Plugins->Filters->Common filter settings - /admin/settings.php?section=commonfiltersettings
      13. Enable 'Filter navigation with system context' and click Save changes
      14. Reload the course management page
      15. Confirm the 'Contexts for which filters were loaded' in the footer is 4 fewer, eg 5, the difference is the number of courses and categories no longer loaded into navigation.
      Show
      Prerequisites: 1) Visit Site Administration -> Debugging settings at /admin/settings.php?section=debugging Enable 'Performance info' 2) Visit  Site Administration -> Plugins -> Filters -> Manage filters Ensure ' Activity names auto linking' and 'Display H5P' are both on Switch both of these filters to apply to 'Content and headings'   Testing Visit Site Administration->Course->Course and category management - /course/management.php Click Create new Category Ensure Parent Category is the default 'Category 1' Name this ' Subcategory 1 ' and click Create category Click Create new Category again Ensure parent category is 'Subcategory 1' Name this category ' Subcategory 2 ' and click Create category Click Create new course Ensure the category is within Subcategory 2 Fill the form in with 'test' as the name and shortname, then click Save and Return View the performance footer, and take note of the amount of ' Contexts for which filters were loaded ' such as 9 In another tab, open Site Administration->Plugins->Filters->Common filter settings - /admin/settings.php?section=commonfiltersettings Enable 'Filter navigation with system context' and click Save changes Reload the course management page Confirm the 'Contexts for which filters were loaded' in the footer is 4 fewer , eg 5, the difference is the number of courses and categories no longer loaded into navigation.

    Description

      We have several customers who have quite expansive categories lists of courses, and naturally if you're on a course, the navigation will build the tree down to the point you're at, and typically will apply filters as well.

      The problem we're seeing is that the navigation will apply the filtering by context and need to fetch many separate contexts to work out the filtering - in some cases this has amounted to hundreds of lookups to fetch filters.

      I'm wondering if the solution to this problem is to have the navigation system only ever treat the filters as coming from the system context (or, instead, have this as an option) since if you're using multilang on titles, you probably need it at all contexts anyway (therefore having it in the system context doesn't make things significantly worse)

      The worst cases for us are when users take a quiz and the quiz ends up producing hundreds of queries form each user for each page load, just to fetch the filters.

      Attachments

        1. MDL-67428_master.webm
          2.37 MB
          Angelia Dela Cruz
        2. MDL-67428_v311.webm
          2.25 MB
          Angelia Dela Cruz

        Issue Links

          Activity

            People

              peterburnett Peter Burnett
              peter.spicer Peter Spicer
              Brendan Heywood Brendan Heywood
              Ilya Tregubov Ilya Tregubov
              Angelia Dela Cruz Angelia Dela Cruz
              Votes:
              3 Vote for this issue
              Watchers:
              14 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Time Tracking

                  Estimated:
                  Original Estimate - 0 minutes
                  0m
                  Remaining:
                  Remaining Estimate - 0 minutes
                  0m
                  Logged:
                  Time Spent - 1 hour, 10 minutes
                  1h 10m

                  Clockify

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