Route preloading doesn't run on dynamic page cache hits

Created on 12 January 2024, 12 months ago
Updated 26 February 2024, 10 months ago

Problem/Motivation

Found in 📌 Add authenticated user umami performance tests Fixed .

As an authenticated user visiting the front page, there are at least two cache gets for routes on dynamic page cache hits.

This is because the route preloader runs after the dynamic page cache request subscriber, which on a cache hit means it never runs. However cache misses on parts of the page, or uncached placeholder replacements can still benefit from the preloaded routes.

Conversely, we could say that this shouldn't run on cache hits because if no URLs are generated from routes, we'd save the work, however system_js_settings_alter checking isFrontPage() is one of the two route loads that happens, and that runs on every request even with dynamic page cache hits it looks like.

Steps to reproduce

Proposed resolution

Add an explicit priority to the route preloader.

Remaining tasks

User interface changes

API changes

Data model changes

Release notes snippet

📌 Task
Status

Needs work

Version

11.0 🔥

Component
Routing 

Last updated 3 days ago

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

Merge Requests

Comments & Activities

Production build 0.71.5 2024