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

Woefully inefficient query in admin/qtypes.php

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Minor Minor
    • 4.0.7, 4.1.2
    • 4.0.6, 4.1.1
    • Questions
    • MOODLE_400_STABLE, MOODLE_401_STABLE
    • MOODLE_400_STABLE, MOODLE_401_STABLE
    • MDL-77147_401
    • Hide
      1. Ideally, before this is integrated, go to admin/qtypes.php, and screen-grab all the numbers.
      2. Then, with the new code in place visit Admin -> Plugins -> Question types -> Manage question types (admin/qtypes.php).
      3. Verify that the page displays with no errors.
      4. If you were able to get a 'before' screen-grab, Verify that the numbers in the 'No. questions' column are the same.

      Here is a screen-grab from https://qa.moodledemo.net/admin/qtypes.php

      Show
      Ideally, before this is integrated, go to admin/qtypes.php, and screen-grab all the numbers. Then, with the new code in place visit Admin -> Plugins -> Question types -> Manage question types (admin/qtypes.php). Verify that the page displays with no errors. If you were able to get a 'before' screen-grab, Verify that the numbers in the 'No. questions' column are the same. Here is a screen-grab from https://qa.moodledemo.net/admin/qtypes.php

      This query is just terrible: https://github.com/moodle/moodle/blob/master/admin/qtypes.php#L48

      It is taking over a minute to run on our server, and can obviously be improved.

        1. (I) Passed -- (400)MDL-77147.png
          67 kB
          Kim Jared Lucas
        2. (I) Passed -- (401)MDL-77147.png
          67 kB
          Kim Jared Lucas
        3. (I) Passed -- (Master)MDL-77147.png
          46 kB
          Kim Jared Lucas
        4. image-2023-02-06-13-14-15-844.png
          36 kB
          Tim Hunt

            timhunt Tim Hunt
            timhunt Tim Hunt
            Anupama Sarjoshi Anupama Sarjoshi
            Paul Holden Paul Holden
            Kim Jared Lucas Kim Jared Lucas
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

              Created:
              Updated:
              Resolved:

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

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