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

Small patch to greatly reduce the number of database queries on the front page for administrators

    Details

    • Type: Improvement
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 2.2.2
    • Fix Version/s: 2.3
    • Component/s: Libraries
    • Labels:

      Description

      While working on a navigation issue I noticed that the function moodle_needs_upgrading() was making hundreds of calls to get_config for plugins, which in turn was leading to hundreds of database queries.
      I had a quick look at the code and think there is a pretty easy solution to reduce that hundreds of queries to a single query.
      I've created a branch and will put this up for peer-review now.

      Please note it only effects those with the moodle/site:config and only where moodle_needs_upgrading(). Pretty much site front page and admin/index.php are the main two.

      Cheers
      Sam

        Gliffy Diagrams

          Attachments

            Activity

              People

              • Votes:
                0 Vote for this issue
                Watchers:
                1 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:
                  Fix Release Date:
                  25/Jun/12