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

Major room for performance improvement in filter_glossary (backport of MDL-47962)

XMLWordPrintable

    • MOODLE_34_STABLE, MOODLE_35_STABLE
    • MOODLE_34_STABLE, MOODLE_35_STABLE
    • Hide

      Copied and pasted from MDL-47962:

      The main thing to test here is that there are no regressions in relation to the glossary filter, so redoing MDLQA-11715 and MDLQA-11716 would be a good test.

      It would also be good to verify that there are not regressions in other filters that use the filter_phrases function (Activity names, Censorship and Database filters). As far as I can see (e.g. tracker queries project = MDLQA AND text ~ 'filter' AND component = "Database activity module" AND parent = MDLQA-11698 or project = MDLQA AND component = "Filters" AND parent = MDLQA-11698 there are no manual tests for this, which I take to mean that the automated tests for these are sufficient.

      Finally, you could either look at my test results below, and consider them sufficient, or replicate them yourself. You would need to:

      1. Create a course with many lables (or many activities set to show description on the course page).
      2. Create a main glossary containing may terms. (An import from qa.moodle.net is a good way to get this.)
      3. Ensure the glossary filter is turned on.
      4. Turn on display of performance info in the footer (or turn on profiling)
      5. Verify that without this fix the course page loads slowly, and with it it loads fast.
      Show
      Copied and pasted from MDL-47962 : The main thing to test here is that there are no regressions in relation to the glossary filter, so redoing MDLQA-11715 and MDLQA-11716 would be a good test. It would also be good to verify that there are not regressions in other filters that use the filter_phrases function (Activity names, Censorship and Database filters). As far as I can see (e.g. tracker queries project = MDLQA AND text ~ 'filter' AND component = "Database activity module" AND parent = MDLQA-11698 or project = MDLQA AND component = "Filters" AND parent = MDLQA-11698 there are no manual tests for this, which I take to mean that the automated tests for these are sufficient. Finally, you could either look at my test results below, and consider them sufficient, or replicate them yourself. You would need to: Create a course with many lables (or many activities set to show description on the course page). Create a main glossary containing may terms. (An import from qa.moodle.net is a good way to get this.) Ensure the glossary filter is turned on. Turn on display of performance info in the footer (or turn on profiling) Verify that without this fix the course page loads slowly, and with it it loads fast.

      The changes done in MDL-47962 are a huge performance win. In the simple test course I was using for develoment, page-load time went from 3 seconds to 1 second because time spent in filter_glossary went from 2 seconds to 0.1 seconds.

      On our live system, we have courses where average page-load time is more than 10 seconds, which makes this a bug in my mind.

      The only reasons the MDL-47962 was not applied to stables immediately is that it is quite a large change (although it only actually affects two code files: filter/glossary/filter.php and lib/filterlib.php). The change is backwards compatible.

            timhunt Tim Hunt
            timhunt Tim Hunt
            Eloy Lafuente (stronk7) Eloy Lafuente (stronk7)
            Anna Carissa Sadia Anna Carissa Sadia
            Votes:
            2 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved:

                Estimated:
                Original Estimate - Not Specified
                Not Specified
                Remaining:
                Remaining Estimate - 0 minutes
                0m
                Logged:
                Time Spent - 4 hours
                4h

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