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

Improve speed of admin/blocks.php by combining db counts

    XMLWordPrintable

Details

    • MDL-75667-master
    • Easy
    • Hide

      As this is a performance tracker we want a comparison before and after the patch, ideally on a very large site with lots of block instances.

      1. Turn on $CFG->perfdebug
      2. Load admin/blocks.php and load it a couple times to let everything warm up and stabilize
      3. Note the number of reads in the footer eg DB reads/writes: 209/0
      4. Note the total page load time, eg 10 seconds
      5. Apply the patch
      6. Load admin/blocks.php and load it a couple times to let everything warm up and stabilize
      7. Confirm the number of read has gone down dramatically DB reads/writes: 114/0
      8. Confirm the total page time is now lower eg (TBA)

       

      Show
      As this is a performance tracker we want a comparison before and after the patch, ideally on a very large site with lots of block instances. Turn on $CFG->perfdebug Load admin/blocks.php and load it a couple times to let everything warm up and stabilize Note the number of reads in the footer eg DB reads/writes: 209/0 Note the total page load time, eg 10 seconds Apply the patch Load admin/blocks.php and load it a couple times to let everything warm up and stabilize Confirm the number of read has gone down dramatically DB reads/writes: 114/0 Confirm the total page time is now lower eg (TBA)  

    Description

      On a large this this page can be slow, 10+ seconds to load

      /admin/blocks.php

      It is looking up all block types, then doing a db count call for each row. All of these could be combined into a single sql grouped by type and it should be an order of magnitude quicker.

      Attachments

        Activity

          People

            farhan6318 Farhan Karmali
            brendanheywood Brendan Heywood
            Brendan Heywood Brendan Heywood
            David Woloszyn, Huong Nguyen, Jake Dallimore, Meirza, Michael Hawkins, Raquel Ortega, Safat Shahin, Stevani Andolo, Matteo Scaramuccia, David Woloszyn, Huong Nguyen, Jake Dallimore, Meirza, Michael Hawkins, Raquel Ortega, Safat Shahin, Stevani Andolo
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

            Dates

              Created:
              Updated:

              Time Tracking

                Estimated:
                Original Estimate - 0 minutes
                0m
                Remaining:
                Remaining Estimate - 0 minutes
                0m
                Logged:
                Time Spent - 30 minutes
                30m