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

performance problems in feedback_load_capabilities()

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 2.0
    • Fix Version/s: 2.0.8
    • Component/s: Feedback
    • Labels:
      None
    • Affected Branches:
      MOODLE_20_STABLE
    • Fixed Branches:
      MOODLE_20_STABLE

      Description

      The problem is that each has_capability() call results in db access the first time when capability+context used. The performance of has_capability() was improved in 1.9dev, but it is stil a major problem in 1.7.x and 1.8.x.

      It is recommended to do the permission checks only when needed, it is not a problem the do the same check twice, because the results are cached in static cache inside has_capability().

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              grabs Andreas Grabs
              Reporter:
              skodak Petr Skoda
              Participants:
              Component watchers:
              Amaia Anabitarte, Carlos Escobedo, Ferran Recio, Ilya Tregubov, Sara Arjona (@sarjona)
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved:
                Fix Release Date:
                12/Mar/12