Store menu_link_content translations in menu_tree

Created on 8 March 2025, 29 days ago

Problem/Motivation

On a single-language site, menu_link_content entities display their title directly from the data stored in menu_tree table.

On multilingual sites however, it loads every single of those menu_link_content entities, figures out which translation to use and then loads it directly from that. With large menus (lets say 100 menu links), that becomes very costly.

Per 📌 MenuTreeStorage shouldn't invalidate cache tags if the menu didn't change Active , it even updates the stored title and description to the currently active language while saving, but all that is ignored, so it's not really noticeable.

Steps to reproduce

Proposed resolution

Consider storing an array of all translations for a given link. One challenge is behavior of translations and language fallbacks, that operate on that entity. Possibly on save it needs to loop over all languages and figure out the right tranlation for each and then persist that?

Remaining tasks

User interface changes

Introduced terminology

API changes

Data model changes

Release notes snippet

📌 Task
Status

Active

Version

11.0 🔥

Component

menu_link_content.module

Created by

🇨🇭Switzerland berdir Switzerland

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