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

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Critical Critical
    • 2.3
    • 2.3
    • Administration
    • None

      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

        1. 26155.jpg
          29 kB
          Sam Hemelryk
        2. 26155-moodlelib.patch
          3 kB
          Sam Hemelryk

            samhemelryk Sam Hemelryk
            samhemelryk Sam Hemelryk
            Eloy Lafuente (stronk7) Eloy Lafuente (stronk7)
            Rajesh Taneja Rajesh Taneja
            Votes:
            1 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved:

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