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

Improve performance/information for the labels upgrade in MDL-77612

    XMLWordPrintable

Details

    • MOODLE_402_STABLE
    • MOODLE_400_STABLE, MOODLE_401_STABLE, MOODLE_402_STABLE
    • MDL-78010-401
    • MDL-78010-402
    • MDL-78010-master
    • Hide

      Prepare the scenario:

      1. Important: the script will create a huge amount of labels on the SITE course and will be hard to clean after that. I strongly recommend creating a new instance just for the test and remove it later.
      2. Copy both mdl-78010-generator.phpand mdl-78010-generate.phpto your instance root folder.
      3. To create 1000 labels, 50% with PLUGINFILE you can do one of the following:
        1. Option A: run in CLI: php mdl-78010-generate.php -t=1000 -d
        2. Option B: login as admin and access YOUSITE/mdl-78010-generator.php. Once there indicate
          1. Number of labels to generate: 1000
          2. Percentage of labels to generate with PLUGINFILE: 50
          3. Select "Downgrade label module to force the upgrade process execution"
          4. Click on Generate
      4. Display the scenario stats. You have two options:
        1. Run in CLI: php mdl-78010-generate.php
        2. If you are in YOUSITE/mdl-78010-generator.php and look at the "Current scenario" section
      5. Check you have at least "Total labels: 1000" and "Labels with @@PLUGINFILE@@: 500"

      Execute the upgrade:

      1. Go to site administration as admin. If you prepare the scenario with downgrade as explained before this should trigger the upgrade. Continue the upgrade process.
        1. Check that "Text and media area" is going to be upgraded and click on "Upgrade moodle database now"
        2. Check a progress bar appear in the label upgrade summary
        3. Check the number of upgraded labels is the same as the one you see in the preparing scenario (should be 500 unless you have other labels previously created.)
      2. When the upgrade is done go to YOUSITE/mdl-78010-generator.php
        1. Check the "Lavels with @@PLUGINFILE@@" is now zero
      Show
      Prepare the scenario: Important: the script will create a huge amount of labels on the SITE course and will be hard to clean after that. I strongly recommend creating a new instance just for the test and remove it later. Copy both mdl-78010-generator.php and mdl-78010-generate.php to your instance root folder. To create 1000 labels, 50% with PLUGINFILE you can do one of the following: Option A: run in CLI: php mdl-78010-generate.php -t=1000 -d Option B: login as admin and access YOUSITE/mdl-78010-generator.php. Once there indicate Number of labels to generate: 1000 Percentage of labels to generate with PLUGINFILE: 50 Select "Downgrade label module to force the upgrade process execution" Click on Generate Display the scenario stats. You have two options: Run in CLI: php mdl-78010-generate.php If you are in YOUSITE/mdl-78010-generator.php and look at the "Current scenario" section Check you have at least "Total labels: 1000" and "Labels with @@PLUGINFILE@@: 500" Execute the upgrade: Go to site administration as admin. If you prepare the scenario with downgrade as explained before this should trigger the upgrade. Continue the upgrade process. Check that "Text and media area" is going to be upgraded and click on "Upgrade moodle database now" Check a progress bar appear in the label upgrade summary Check the number of upgraded labels is the same as the one you see in the preparing scenario (should be 500 unless you have other labels previously created.) When the upgrade is done go to YOUSITE/mdl-78010-generator.php Check the "Lavels with @@PLUGINFILE@@" is now zero
    • HQ 2023 Sprint i2.1 Moppies

    Description

      As Tim mentioned in MDL-77612, the upgrade for the mod_label might take a few minutes (depending on the labels in your Moodle instance).

      It would be great, at least, to add a progress bar to inform about the current status of the upgrade.

      Apart from that, an analysis can be done (in a separate issue if required), to check if it would be possible to improve performance:

      • searching for candidate labels if they have something to differentiate them (say LIKE %PLUGINFILE%' OR sql_length() > xxx OR ....).
      • delegating it to a recurring ad-hoc task, till there isn't any remaining (we have used that in the past).

      Attachments

        Issue Links

          Activity

            People

              tusefomal Ferran Recio
              sarjona Sara Arjona (@sarjona)
              Jordi Pujol-Ahulló Jordi Pujol-Ahulló
              Sara Arjona (@sarjona) Sara Arjona (@sarjona)
              Ron Carl Alfon Yu Ron Carl Alfon Yu
              Votes:
              5 Vote for this issue
              Watchers:
              13 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Time Tracking

                  Estimated:
                  Original Estimate - 0 minutes
                  0m
                  Remaining:
                  Remaining Estimate - 0 minutes
                  0m
                  Logged:
                  Time Spent - 1 day, 3 hours, 47 minutes
                  1d 3h 47m

                  Clockify

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