Use a lazy builder/placeholder for the top bar

Created on 11 April 2025, 11 days ago

Problem/Motivation

The navigation top bar is rendered directly in navigation_page_top() / the top_bar element, rather than via a #lazy_builder.

There are at least a couple of advantages to rendering it within a lazy builder:

1. Any cache tags or cache contexts from local task access checks won't reach the dynamic page cache (because they'll be isolated to the placeholder), this will mean higher cache hit rates for the dynamic page cache.

2. I found this via 📌 Try to replace path alias preloading with lazy generation Active which relies on Fibers + placeholders to create a list of path aliases to load, which are then loaded all at once when returning to the first Fiber/placeholder. When the local tasks are in a placeholder (which currently happens either with the old toolbar, or for users without access to it), the links from those get picked up, which allows that to work better.

Steps to reproduce

Proposed resolution

Remaining tasks

User interface changes

Introduced terminology

API changes

Data model changes

Release notes snippet

📌 Task
Status

Active

Version

11.0 🔥

Component

navigation.module

Created by

🇬🇧United Kingdom catch

Live updates comments and jobs are added and updated live.
  • Performance

    It affects performance. It is often combined with the Needs profiling tag.

Sign in to follow issues

Comments & Activities

Production build 0.71.5 2024