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

Improve performance for the navigation bar


    • 10

      In MDL-72852, a performance issue was raised when a change was integrated to remove the Badges option in the secondary navigation if there are no badges to be displayed to the user.

      These were my findings while I was trying to find a patch for improving the performance:

      • There are a few options in the navigation that are called "course essentials" (Participants, Badges, Blogs...).
      • The course_get_user_navigation_options() (the method that was changed in the patch in MDL-72852) is called on each request from the add_course_essentials() method, to initialise the basic navigation options that are available or not for the current user.
      • This information is calculated always, although it is not always displayed, for instance, using boost on module pages like forums. However, it might be required by some blocks, like Navigation.
      • The Navigation block is hidden by default in boost since MDL-73347, so at any point, we should check if it's possible to change the way these navigation options are loaded, to only get this information when it's strictly required.
      • The basic navigation options are not cached (although they won't probably change that often during the user session).

      This issue is to improve performance for the navigation (at least in the places we know won't change that often and are called on every single page).

      The following video (which was recorded without the patch in MDL-72852), shows that the secondary navigation in the course needs a few seconds to appear:

            Unassigned Unassigned
            sarjona Sara Arjona (@sarjona)
            3 Vote for this issue
            10 Start watching this issue


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