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

Improve performance for making test courses.

XMLWordPrintable

    • Icon: Improvement Improvement
    • Resolution: Fixed
    • Icon: Minor Minor
    • 3.0.6, 3.1.2
    • 3.2
    • Performance
    • MOODLE_32_STABLE
    • MOODLE_30_STABLE, MOODLE_31_STABLE
    • Hide
      All branches
      • Verifying the changes to the random_bytes function.
        In most cases you will be running PHP with either openssl or PHP7. You have 2 options; either install a PHP5.6 without openssl or just comment out the code.

      For commenting out the code you need to lib/moodlelib.php:7800 (The closing brace on the $length <=0 test) is the start. Then lib/moodlelib.php:7814 (The closing brace on the function_exists() test).

      • Run the phpunit tests and ensure they all pass.

      NOTE: The performance of maketestcourse.php is only improved when openssl or random_bytes is accessible. See the comments about performance results to show that. In nearly all cases users will have one of these functions for 3.2. And ssl is a recommended inclusion. Performance changes only need be tested on master. Only the random_bytes_emulate fixes were backported.

      Master only
      • Using stable master, make an (M) test course

        php admin/tool/generator/cli/maketestcourse.php --shortname=L4.2 --size=M
        

      • Using integration master, make an (M) test course
      • Verify the timing is faster, especially for file creation. Others may be faster, depending on the database used, PostgreSQL has problems with large transactions and removing the transaction made assignment creation faster.
      • For the enthusiastic, do the same for (L).

      When creating (L) nearly all the time will be spent creating assignments. This is due to the large number of regrading queries that are sent.

      Show
      All branches Verifying the changes to the random_bytes function. In most cases you will be running PHP with either openssl or PHP7. You have 2 options; either install a PHP5.6 without openssl or just comment out the code. For commenting out the code you need to lib/moodlelib.php:7800 (The closing brace on the $length <=0 test) is the start. Then lib/moodlelib.php:7814 (The closing brace on the function_exists() test). Run the phpunit tests and ensure they all pass. NOTE: The performance of maketestcourse.php is only improved when openssl or random_bytes is accessible. See the comments about performance results to show that. In nearly all cases users will have one of these functions for 3.2. And ssl is a recommended inclusion. Performance changes only need be tested on master. Only the random_bytes_emulate fixes were backported. Master only Using stable master, make an (M) test course php admin/tool/generator/cli/maketestcourse.php --shortname=L4.2 --size=M Using integration master, make an (M) test course Verify the timing is faster, especially for file creation. Others may be faster, depending on the database used, PostgreSQL has problems with large transactions and removing the transaction made assignment creation faster. For the enthusiastic, do the same for (L). When creating (L) nearly all the time will be spent creating assignments. This is due to the large number of regrading queries that are sent.

      *Creating test files uses a slow method for generating random bytes.
      *Gradebook update is very slow on (L) courses and larger.

      Test file creation can be made much much faster, Gradebook grade_item updates should be able to be fast when there aren't any student enrolments in the course, however that has not been tackled as part of this change.

            mr-russ Russell Smith
            mr-russ Russell Smith
            David Monllaó David Monllaó
            Andrew Lyons Andrew Lyons
            John Okely John Okely
            Votes:
            1 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved:

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