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

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

    XMLWordPrintable

    Details

    • Type: Improvement
    • Status: Closed
    • Priority: Critical
    • Resolution: Fixed
    • Affects Version/s: 2.5.2, 2.6
    • Fix Version/s: 2.5.4
    • Component/s: Performance
    • Labels:
    • Testing Instructions:
      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
    • Affected Branches:
      MOODLE_25_STABLE, MOODLE_26_STABLE
    • Fixed Branches:
      MOODLE_25_STABLE
    • Pull from Repository:
    • Pull Master Branch:
      MDL-42447_master

      Description

      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.

        Attachments

          Issue Links

            Activity

              People

              • Votes:
                0 Vote for this issue
                Watchers:
                5 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:
                  Fix Release Date:
                  13/Jan/14