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

Minimize DB calls in forum_is_subscribed() function

    XMLWordPrintable

    Details

    • Type: Improvement
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 2.7
    • Fix Version/s: 2.8
    • Component/s: Forum
    • Labels:

      Description

      This function calls for the course module and context values, but those values usually already exist in the page calling the function, so I suggest adding them to the function call to reduce unnecessary DB queries for data that we already have. Only when the variables are empty the function will populate them.

        Attachments

          Activity

            People

            Assignee:
            dobedobedoh Andrew Nicols
            Reporter:
            l.gil Lior Gil
            Peer reviewer:
            Marina Glancy
            Integrator:
            Eloy Lafuente (stronk7)
            Tester:
            CiBoT
            Participants:
            Component watchers:
            Andrew Nicols, Jun Pataleta, Michael Hawkins, Shamim Rezaie, Simey Lameze
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved:
              Fix Release Date:
              10/Nov/14