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

$CFG->perfdebug uses confusing values

    XMLWordPrintable

Details

    • 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

              Unassigned Unassigned
              mudrd8mz David Mudrák (@mudrd8mz)
              Matteo Scaramuccia, David Woloszyn, Huong Nguyen, Jake Dallimore, Meirza, Michael Hawkins, Raquel Ortega, Safat Shahin, Stevani Andolo
              Votes:
              4 Vote for this issue
              Watchers:
              9 Start watching this issue

              Dates

                Created:
                Updated: