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

get_string calls are causing the generation of the admin tree to be be a painstaking performance hit

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Critical
    • Resolution: Fixed
    • Affects Version/s: 2.3
    • Fix Version/s: 2.3
    • Component/s: Administration
    • Labels:
      None

      Description

      While working on MDL-24125 I noted that a great deal of the time that goes into generating the admin tree is put into get_string calls, of which even with the navigation using the tree most are not used.
      After a bit of investigation and testing I have come up with a solution that makes use of a class with a __toString method to delay the get_string call until it is needed. This reduced the page load time on average by 25% and even reduced memory a little.
      I'll post to a git branch with the solution shortly and provide some more performance information I have gathered.

      Cheers
      Sam

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              samhemelryk Sam Hemelryk
              Reporter:
              samhemelryk Sam Hemelryk
              Integrator:
              Eloy Lafuente (stronk7)
              Tester:
              Rajesh Taneja
              Participants:
              Component watchers:
              Andrew Nicols, Jun Pataleta, Michael Hawkins, Shamim Rezaie, Simey Lameze
              Votes:
              1 Vote for this issue
              Watchers:
              4 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved:
                Fix Release Date:
                25/Jun/12