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

$CFG->perfdebug uses confusing values

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Won't Do
    • Icon: Major Major
    • None
    • 2.0.1
    • Performance
    • MOODLE_20_STABLE

      While working on format_text() performance, I realized there is a bug in

                  if (!empty($CFG->perfdebug)) {
                      self::$singletoninstance = new performance_measuring_filter_manager();
                  } else {
                      self::$singletoninstance = new self();
                  }

      $CFG->perfdebug uses values 7 (unchecked) and 15 (checked) since very early commits back in 2005 - and therefore Moodle 2.0 always instantinates performance_measuring_filter_manager() even if it does not need to.

      The values used by $CFG->perfdebug are confusing and may lead easily to other bugs like this one. I suggest to update $CFG->perfdebug to simple 0/1 switcher.

            Unassigned Unassigned
            mudrd8mz David Mudrák (@mudrd8mz)
            Votes:
            4 Vote for this issue
            Watchers:
            9 Start watching this issue

              Created:
              Updated:
              Resolved:

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