Moodle
  1. Moodle
  2. MDL-14514

performance problems in feedback_load_capabilities()

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Minor 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
    • Rank:
      543

      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().

        Issue Links

          Activity

          Hide
          Andreas Grabs added a comment -

          It is solved since April 02, 2010
          But at this time a hadn't any knowledge about using git.
          Here the link to the commit:
          https://github.com/moodle/moodle/blob/c987dbad0eea19ad0c9d79cc67cc0ad5431bb330/mod/feedback/lib.php
          Best regards
          Andreas

          Show
          Andreas Grabs added a comment - It is solved since April 02, 2010 But at this time a hadn't any knowledge about using git. Here the link to the commit: https://github.com/moodle/moodle/blob/c987dbad0eea19ad0c9d79cc67cc0ad5431bb330/mod/feedback/lib.php Best regards Andreas

            People

            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: