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

Scalability issues without lazy load site analysables

XMLWordPrintable

    • MOODLE_34_STABLE
    • MOODLE_34_STABLE
    • MDL-60434_master
    • Hide

      You will need a site with say... 100 courses with students (you can use admin/tool/generator/cli/maketestsite.php)

      1. Here you have a patch to help you test this issus: Cherry pick the testing commit (it just displays memory usage info) git fetch git://github.com/dmonllao/moodle.git MDL-60434_master-test ; git cherry-pick MDL-60434_master-test (better than pull, I don't want to keep updating this commit base)
      2. Go to "Site admin > Analytics > Analytics models" and look for "Students at risk of dropping out" modelid (you can find it in any of "Actions" menu links
      3. Execute php admin/tool/analytics/cli/evaluate_model.php --modelid= {MODEL_ID_HERE}
        # You should see a before: and after:; the difference between these 2 values should not be significant (in a test site without thousands of courses I get around 200KB difference)
        # Revert this issue's patches (do not purge caches)
        # Execute again php admin/tool/analytics/cli/evaluate_model.php --modelid={MODEL_ID_HERE}
      4. You should see a before: and after:; the difference between these 2 values should be bigger than before (in a test site without thousands of courses I get around 1.8MB difference)
      Show
      You will need a site with say... 100 courses with students (you can use admin/tool/generator/cli/maketestsite.php) Here you have a patch to help you test this issus: Cherry pick the testing commit (it just displays memory usage info) git fetch git://github.com/dmonllao/moodle.git MDL-60434 _master-test ; git cherry-pick MDL-60434 _master-test (better than pull, I don't want to keep updating this commit base) Go to "Site admin > Analytics > Analytics models" and look for "Students at risk of dropping out" modelid (you can find it in any of "Actions" menu links Execute php admin/tool/analytics/cli/evaluate_model.php --modelid= {MODEL_ID_HERE} # You should see a before: and after: ; the difference between these 2 values should not be significant (in a test site without thousands of courses I get around 200KB difference) # Revert this issue's patches (do not purge caches) # Execute again php admin/tool/analytics/cli/evaluate_model.php --modelid={MODEL_ID_HERE} You should see a before: and after: ; the difference between these 2 values should be bigger than before (in a test site without thousands of courses I get around 1.8MB difference)

      get_analysables interface should return all analysable elements available on the site because we need all of them to sort them later and see which should be processed next and similar things. We should avoid initialising analysables until it is really required so in order to keep memory usage low and constant we can:

      1. Defer analysable elements initialisation (e.g. loading of course data, students, activities info...)
      2. unset analysables that have already been processed

      I am flagging this as a bug intentionally.

            dmonllao David Monllaó
            dmonllao David Monllaó
            Ryan Wyllie Ryan Wyllie
            Jake Dallimore Jake Dallimore
            Simey Lameze Simey Lameze
            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.