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

Capability overview loading same context data repeatedly

XMLWordPrintable

      The capability overview improvements implemented by MDL-40368 introduced a recursive function call in the renderer. This recursive call to 'capability_comparison_table()' is called once for each context. Each call in turn calls the tool_capability_calculate_role_data() function using the exact same parameters as the callee. This behaviour results in slow page loading which can potentially lead to timeouts when a large result sets are generated (usually when there are lots of overrides and/or capabilities selected).

      One proposed solution to address this involves adding a static variable to capability_comparison_table() which will cache the return data from tool_capability_calculate_role_data() for each different capability / context combination.

      I will link a change with this proposed solution in this tracker shortly.

            lameze Simey Lameze
            luketucker Luke Tucker
            Simey Lameze Simey Lameze
            Eloy Lafuente (stronk7) Eloy Lafuente (stronk7)
            CiBoT CiBoT
            Votes:
            0 Vote for this issue
            Watchers:
            7 Start watching this issue

              Created:
              Updated:
              Resolved:

                Estimated:
                Original Estimate - 0 minutes
                0m
                Remaining:
                Remaining Estimate - 0 minutes
                0m
                Logged:
                Time Spent - 4 hours, 11 minutes
                4h 11m

                  Error rendering 'clockify-timesheets-time-tracking-reports:timer-sidebar'. Please contact your Jira administrators.