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

$CFG->perfdebug uses confusing values

    XMLWordPrintable

    Details

    • Affected Branches:
      MOODLE_20_STABLE

      Description

      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.

        Attachments

          Issue Links

            Activity

              People

              • Votes:
                3 Vote for this issue
                Watchers:
                8 Start watching this issue

                Dates

                • Created:
                  Updated: