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

Admin category/page locate is time consuming with debug on

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Major Major
    • None
    • 2.5.1
    • Administration
    • MOODLE_25_STABLE

      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).

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

            Unassigned Unassigned
            bushido Mark Nielsen (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved:

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