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

Cache profile_has_required_custom_fields_set in session to avoid a db call during bootstrap

    XMLWordPrintable

    Details

    • Type: Improvement
    • Status: Open
    • Priority: Minor
    • Resolution: Unresolved
    • Affects Version/s: 4.0
    • Fix Version/s: None
    • Component/s: Performance
    • Affected Branches:
      MOODLE_400_STABLE

      Description

      On every page load the user_not_fully_set_up calls profile_has_required_custom_fields_set

      https://github.com/moodle/moodle/blob/master/lib/moodlelib.php#L3414

      which makes this DB call:

      https://github.com/moodle/moodle/blob/master/user/profile/lib.php#L894-L902

      This logic is only very briefly needed for new accounts and then it could be safely set in their session and ignored. 

       

        Attachments

          Activity

            People

            Assignee:
            Unassigned Unassigned
            Reporter:
            brendanheywood Brendan Heywood
            Participants:
            Component watchers:
            Matteo Scaramuccia, Andrew Nicols, Dongsheng Cai, Huong Nguyen, Jun Pataleta, Michael Hawkins, Shamim Rezaie, Simey Lameze
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Dates

              Created:
              Updated: