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

send_file_not_found() very inefficient - we should be able to bypass for some SCORM packages

    Details

    • Testing Instructions:
      Hide

      I have a commercial SCORM package provided from Skillsoft(thanks Martin) that can be shared with integrator/tester that purposely generates a bunch of 404 errors but this can't be shared publicly on the tracker issue - please contact me for details.

      Load the SCORM package provided that generates 404's during load.
      Check to see how long it takes to load without the patch in place and with the patch in place - load time should be a lot quicker with the patch in place.

      Show
      I have a commercial SCORM package provided from Skillsoft(thanks Martin) that can be shared with integrator/tester that purposely generates a bunch of 404 errors but this can't be shared publicly on the tracker issue - please contact me for details. Load the SCORM package provided that generates 404's during load. Check to see how long it takes to load without the patch in place and with the patch in place - load time should be a lot quicker with the patch in place.
    • Affected Branches:
      MOODLE_21_STABLE
    • Fixed Branches:
      MOODLE_21_STABLE, MOODLE_22_STABLE
    • Pull Master Branch:
      master_MDL-32147

      Description

      Reported and traced by Martin Holden from Skillsoft - thanks Martin!

      when print_error() is called inside send_file_not_found() this appears to make the 404 response insanely slow.
      commenting it out results in a much faster response to the server - I haven't looked at the code yet - does filelib do an ob_start() before calling send_file_not_found? - do we need to keep the friendly error at all?

      function send_file_not_found() {
         //global $CFG, $COURSE;
         header('HTTP/1.0 404 not found');
         //print_error('filenotfound', 'error', $CFG->wwwroot.'/course/view.php?id='.$COURSE->id);
        die;
      }
      

        Gliffy Diagrams

          Attachments

            Activity

              People

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

                Dates

                • Created:
                  Updated:
                  Resolved:
                  Fix Release Date:
                  14/May/12