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

very high memory comsumption for feedback module->show entries on big Moodle platforms

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 1.9.1
    • Fix Version/s: 1.9.5, 2.0
    • Component/s: Feedback
    • Labels:
      None
    • Environment:
      SLES10SP2; MySQL; $module->version = 2008050111
    • Database:
      MySQL
    • Affected Branches:
      MOODLE_19_STABLE
    • Fixed Branches:
      MOODLE_19_STABLE, MOODLE_20_STABLE

      Description

      The feedback Module calls in show_entries.php lines129/131 '$students = feedback_get_complete_users($cm->id);' for users which are allowed to complete the feedback. But this call returns a array of all users of Moodle either the feedback is on the frontpage or in a normal course. For our platform with 17000 users the memory consumption is about 250MB.
      Replacing this call with a call to: '$students = get_records_sql("select user.* from mdl_user user, mdl_feedback_completed WHERE user.id=userid AND feedback=$feedback->id order by lastname");' which returns all users which filled in a feedback returns only the necessary users (and perhaps some old users not more in the course).
      I think this is a bug either in the core or the feedback module. With this change the script consumes only 17MB of memory.
      If you select only a group everything is okay with the original code.

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              grabs Andreas Grabs
              Reporter:
              schuhmann Martin Schuhmann
              Tester:
              Tim Hunt
              Participants:
              Component watchers:
              Amaia Anabitarte, Carlos Escobedo, Ferran Recio, Sara Arjona (@sarjona)
              Votes:
              2 Vote for this issue
              Watchers:
              3 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved:
                Fix Release Date:
                13/May/09