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

Show performance info and/or avoid redirections with MDL_PERFTOFOOT defined?

XMLWordPrintable

    • Icon: Improvement Improvement
    • Resolution: Fixed
    • Icon: Critical Critical
    • 2.5.4
    • 2.5.2, 2.6
    • Performance
    • MOODLE_25_STABLE, MOODLE_26_STABLE
    • MOODLE_25_STABLE
    • MDL-42447_master
    • Hide
      1. Edit your config.php file and add define('MDL_PERF_TEST', true);
      2. Login as admin
      3. You SHOULD be redirected to the front page as usual
      4. Go to a course and open a forum (add a new one if you don't have any)
      5. Add a new discussion
      6. You SHOULD see a text with all the performance info
      7. Go to the course main page click on an activity chooser to add an activity and fill the required form fields (don't click save)
      8. Edit lib/weblib.php and comment the following lines:
        @header($_SERVER['SERVER_PROTOCOL'] . ' 303 See Other');
        @header('Location: '.$url);
      9. Now click Save and return to course
      10. You SHOULD see a text with all the performance info
      Show
      Edit your config.php file and add define('MDL_PERF_TEST', true); Login as admin You SHOULD be redirected to the front page as usual Go to a course and open a forum (add a new one if you don't have any) Add a new discussion You SHOULD see a text with all the performance info Go to the course main page click on an activity chooser to add an activity and fill the required form fields (don't click save) Edit lib/weblib.php and comment the following lines: @header($_SERVER ['SERVER_PROTOCOL'] . ' 303 See Other'); @header('Location: '.$url); Now click Save and return to course You SHOULD see a text with all the performance info

      We have redirections that returns 30X and 200 http codes; most of the time, when we perform actions that writes into DB (adding a forum post, creating new activity...) the action finishes with a redirection (30X) or showing a message + redirection (200), right now if a dev. (or https://github.com/moodlehq/moodle-performance-comparison) is interested in seeing the number of db writes the only option is to grep around the web server logs when MDL_PERFTOLOG is enabled, this option is not available when using https://github.com/moodlehq/moodle-performance-comparison as it is parsing the returned HTML contents. IMO, if MDL_PERFTOFOOT is enabled we should disable redirections and show the performance info, but I think that there are people that will disagree with me I open the issue for discussion.

            dmonllao David Monllaó
            dmonllao David Monllaó
            Frédéric Massart Frédéric Massart
            Eloy Lafuente (stronk7) Eloy Lafuente (stronk7)
            Eloy Lafuente (stronk7) Eloy Lafuente (stronk7)
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved:

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