Performance: do not process untranslatable entities as translatable

Created on 3 October 2022, about 2 years ago
Updated 9 February 2023, almost 2 years ago

Problem/Motivation

Even when an entity is not translatable, this module performs some translation processing.

Proposed resolution

Use $entity->isTranslatable() to skip cycling of entities that are not translatable.

πŸ› Bug report
Status

Needs review

Version

3.0

Component

Code

Created by

πŸ‡―πŸ‡΅Japan ptmkenny

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

  • πŸ‡¬πŸ‡§United Kingdom alexpott πŸ‡ͺπŸ‡ΊπŸŒ

    If the entity is not translatable isn't \Drupal\Core\Entity\ContentEntityBase::getTranslationLanguages() only ever going to return the default language - right?\

    The reason I ask is that I think we should do both the encrypt and decrypt if we're going to do this. Because when those are not mirrors it hurts my head :)

    What sort of speed up did you get with this?

  • πŸ‡¬πŸ‡§United Kingdom alexpott πŸ‡ͺπŸ‡ΊπŸŒ

    Note there is a performance script in the module that you use to prove this change is worth it.

  • πŸ‡―πŸ‡΅Japan ptmkenny

    Needs work and performance testing as per #4.

  • Status changed to Needs work 3 months ago
Production build 0.71.5 2024