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

Assignment view slow page load when available for group members only enabled

    XMLWordPrintable

Details

    • Bug
    • Status: Closed
    • Minor
    • Resolution: Duplicate
    • 2.5.4
    • None
    • Assignment, Groups
    • None
    • MOODLE_25_STABLE

    Description

      Steps to reproduce:
      As admin, set enablegroupmembersonly to "Yes".
      As teacher, in a course with many students

      • create an assignment
      • enable "Common module settings > Available for group members only" for the assignment
      • On the course page click on the assignment (mod/assign/view.php)
      • Notice how long it takes to load the page.

      In an assignment with "Available for group members only" enabled, assignment view (mod/assign/view.php) takes a long time to load. We have a course with 180 students where the page takes more than 1 minute to load making one postgres process using 100% CPU.
      In fact this makes things so slow it renders the assignment close to unusable, at least from the teacher's point of view. In addition the use of this feature has a considerable impact on the database server's workload.

      Assignment view loads normally when "Available for group members only" is disabled.

      I have attached an excerpt from our database log. It's the additional database queries the page generates per student when "Available for group members only" enabled.
      This is probably caused by the call to groups_course_module_visible for each user introduced in http://git.moodle.org/gw?p=moodle.git;a=commit;h=a0e59f04dd422f494f326f5e6ddfcc3b5ae611b1

      Our Moodle database is on PostgreSQL 8.4, but this bug probably affects other databases as well.

      From what I found on the tracker, this is related to MDL-43721 and MDL-41315.

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              schach Heiko Schach
              Adrian Greeve, Jake Dallimore, Mathew May, Mihail Geshoski, Peter Dias, Sujith Haridasan, Andrew Lyons, Huong Nguyen, Jun Pataleta, Michael Hawkins, Shamim Rezaie, Simey Lameze
              Votes:
              2 Vote for this issue
              Watchers:
              5 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: