ContentTranslationManager::isEnabled() can load/create the same config entity many times

Created on 1 June 2024, 3 months ago
Updated 3 June 2024, 3 months ago

Problem/Motivation

Identified this in profiling a multilingual site. isEnabled() loads the config entity (or even creates one on-demand if it doesn't explicitly exist). This has a non-trivial overhead because config entities by default aren't statically cached.

isEnabled() is called a lot, content_translation_language_fallback_candidates_entity_view_alter() calls it, and that can be called dozens to hundreds of times per page, because

Steps to reproduce

Proposed resolution

There are multiple options.

It might already help a lot to just enable static caching on that config entity type, might require some test fixes, we'll see.

We could also use a full cache collector approach that persistently caches this information.

Remaining tasks

User interface changes

API changes

Data model changes

Release notes snippet

πŸ› Bug report
Status

Needs work

Version

11.0 πŸ”₯

Component
Content translationΒ  β†’

Last updated 1 day ago

No maintainer
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

Merge Requests

Comments & Activities

Production build 0.71.5 2024