-
Improvement
-
Resolution: Unresolved
-
Minor
-
None
-
4.0
-
MOODLE_400_STABLE
-
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:
- Discovered while testing
-
MDL-72852 If there are no course badges, students shouldn't have a link to a page saying there are no badges available
- Closed
- has been marked as being related by
-
MDL-74737 Navigation bar render pop-in in moodle 4 is quite noticeable once you see it once
- Closed
- is duplicated by
-
MDL-75679 Tab menu links disappear when clicked
- Closed