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

Performance regression for delete_subscription

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Minor Minor
    • 2.7.1
    • 2.7
    • Forum
    • MOODLE_27_STABLE
    • MOODLE_27_STABLE
    • wip-MDL-45466-master
    • Hide

      Below are the test cases when subscription is changed for not current module (areas the are affected by this patch the most):

      Test 1:
      In a course that has enroled users:

      1. Create forum with autosubscription
      2. Make sure everybody is subscribed

      Test 2:
      As an enrolled user in a course that has some forums with optional susbcription go to /mod/forum/index.php?id=COURSEID

      1. Toggle subscribe
      2. Make sure it has effect

      Test 3:
      As a user subscribed to some forums go to
      /mod/forum/unsusbscribeall.php

      Show
      Below are the test cases when subscription is changed for not current module (areas the are affected by this patch the most): Test 1: In a course that has enroled users: Create forum with autosubscription Make sure everybody is subscribed Test 2: As an enrolled user in a course that has some forums with optional susbcription go to /mod/forum/index.php?id=COURSEID Toggle subscribe Make sure it has effect Test 3: As a user subscribed to some forums go to /mod/forum/unsusbscribeall.php

      Introduced in MDL-40062
      Discovered while peer reviewing MDL-45296 by marina

      Delete_subscription is called (via forum_unsubscribe) in a loop from mod/forum/subscribers.php, which means the performance for delete_subscription is important
      Delete_subscription calls get_coursemodule_from_id, which is very expensive, we need to find a way around it.

            marina Marina Glancy
            johno John Okely
            John Okely John Okely
            Dan Poltawski Dan Poltawski
            Michael de Raadt Michael de Raadt
            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.