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

Admin category/page locate is time consuming with debug on

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 2.5.1
    • Fix Version/s: None
    • Component/s: Administration
    • Labels:
    • Affected Branches:
      MOODLE_25_STABLE

      Description

      First, this only really affects administrators with debug developer turned on.

      But, as developers, I would think that 90% or more of the time, we are logged in as the admin user and have debug maxed out.

      OK, onto the problem: admin_category::add() has a statement where if debugging is turned on, then it attempts to find an admin page with the same name and print out a debug statement. Attaching webgrind screen shots of the performance of this function.

      The short story, with this code enabled, its total inclusive cost is 40% of the page load. Without this code enabled, its total inclusive cost is .55% of the page load.

      Please perform your own profiling, sometimes things are funny with performance, but some of the raw numbers stand on their own (Like how admin_settingpage->locate is called 46,000+ times).

        Attachments

        1. after.png
          after.png
          51 kB
        2. before.png
          before.png
          61 kB

          Issue Links

            Activity

              People

              Assignee:
              Unassigned Unassigned
              Reporter:
              bushido Mark Nielsen
              Participants:
              Component watchers:
              Andrew Nicols, Jun Pataleta, Michael Hawkins, Shamim Rezaie, Simey Lameze
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved: