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

Make get_suspended_userids more efficient

XMLWordPrintable

      The get_suspended_userids function is quite inefficient in a couple of ways:

      1) It uses memory proportional to the number of enrolled users in a context
      2) Multiple calls to expensive get_enrolled_sql

      We have some code trying to call this from the frontpage; this doesn't work as ALL user records are returned (with help of get_enrolled_sql) and evaluated in get_suspended_userids.

      My change allows get_enrolled_sql to return only suspended users, and makes get_suspended_userids take that path, as well as switching to fieldset (less RAM per record), and adding a fast path for the front page.

            tlevi Tony Levi
            tlevi Tony Levi
            Dave Cooper Dave Cooper
            Andrew Lyons Andrew Lyons
            CiBoT CiBoT
            Votes:
            1 Vote for this issue
            Watchers:
            5 Start watching this issue

              Created:
              Updated:
              Resolved:

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