Config overrides are loaded for English even when translate_english is false

Created on 14 April 2025, 7 months ago

Problem/Motivation

When loading the front page of Umami with an empty cache, there are dozens of queries for configuration language overrides, despite the 'translate_english' setting in locale being off by default.

This accounts for something like 60 unnecessary queries, so marking major.

Steps to reproduce

Proposed resolution

We need to get the translate_english setting from locale.settings - however I'm not sure the best way to do that without triggering an infinite loop.

Remaining tasks

User interface changes

Introduced terminology

API changes

Data model changes

Release notes snippet

๐Ÿ› Bug report
Status

Active

Version

11.0 ๐Ÿ”ฅ

Component

configuration system

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

  • Issue created by @catch
  • ๐Ÿ‡ฌ๐Ÿ‡งUnited Kingdom catch

    Pushed a proof of concept, including ๐Ÿ“Œ Add database and cache assertions to OpenTelemetryFrontPagePerformanceTest and OpenTelemetryNodePagePerformanceTest Active which makes it easy to see the difference.

    To do this properly we'd want to inject the config factory.

  • Merge request !11822Resolve #3518992 "Config overrides are" โ†’ (Open) created by catch
  • ๐Ÿ‡ฌ๐Ÿ‡งUnited Kingdom catch
        
        Open Telemetry Front Page Performance (Drupal\Tests\demo_umami\FunctionalJavascript\OpenTelemetryFrontPagePerformance)
         โœ˜ Front page performance
           โ”
           โ”œ Failed asserting that two arrays are identical.
           โ”Š ---ยทExpected
           โ”Š +++ยทActual
           โ”Š @@ @@
           โ”Š  Array &0 [
           โ”Š -ยทยทยทยท'QueryCount'ยท=>ยท376,
           โ”Š -ยทยทยทยท'CacheGetCount'ยท=>ยท471,
           โ”Š -ยทยทยทยท'CacheSetCount'ยท=>ยท467,
           โ”Š +ยทยทยทยท'QueryCount'ยท=>ยท298,
           โ”Š +ยทยทยทยท'CacheGetCount'ยท=>ยท393,
           โ”Š +ยทยทยทยท'CacheSetCount'ยท=>ยท389,
           โ”Š      'CacheDeleteCount' => 0,
           โ”Š      'CacheTagLookupQueryCount' => 49,
           โ”Š      'CacheTagInvalidationCount' => 0,
    
    

    Works.

  • ๐Ÿ‡ฌ๐Ÿ‡งUnited Kingdom catch

    Tidied up the MR. Still includes ๐Ÿ“Œ Add database and cache assertions to OpenTelemetryFrontPagePerformanceTest and OpenTelemetryNodePagePerformanceTest Active but that issue is RTBC, so moving to needs review.

  • ๐Ÿ‡ฌ๐Ÿ‡งUnited Kingdom catch

    https://git.drupalcode.org/project/drupal/-/merge_requests/11822/diffs?c... shows the performance improvement. About 90 database queries and cache gets removed on a cold cache.

  • ๐Ÿ‡จ๐Ÿ‡ญSwitzerland berdir Switzerland

    That setting is only for interface translation, if your config language is not en you need to load english overrides. But maybe we can check the lang code instead?

  • ๐Ÿ‡ฌ๐Ÿ‡งUnited Kingdom catch

    hmm good point, so something like check if the config langcode is the same as the default langcode and short-circuit that way?

  • ๐Ÿ‡ซ๐Ÿ‡ทFrance andypost

    There's many bugs in config translation and locale so I'm not sure we can guess anything until the flow is settled

    IMO the cause here is โœจ Configuration langcode is forced to site default language Needs work

  • The Needs Review Queue Bot โ†’ tested this issue. It no longer applies to Drupal core. Therefore, this issue status is now "Needs work".

    This does not mean that the patch necessarily needs to be re-rolled or the MR rebased. Read the Issue Summary, the issue tags and the latest discussion here to determine what needs to be done.

    Consult the Drupal Contributor Guide โ†’ to find step-by-step guides for working with issues.

  • Status changed to Needs work about 1 month ago
  • Pipeline finished with Failed
    about 1 month ago
    Total: 219s
    #614815
  • Pipeline finished with Failed
    about 1 month ago
    Total: 701s
    #614828
  • Pipeline finished with Failed
    about 1 month ago
    Total: 520s
    #615027
  • Pipeline finished with Success
    about 1 month ago
    Total: 719s
    #615097
  • Pipeline finished with Success
    about 1 month ago
    Total: 722s
    #615337
  • Pipeline finished with Failed
    about 1 month ago
    Total: 329s
    #623048
  • Pipeline finished with Failed
    about 1 month ago
    Total: 250s
    #623057
  • Pipeline finished with Failed
    about 1 month ago
    Total: 219s
    #623064
  • Pipeline finished with Failed
    about 1 month ago
    Total: 623s
    #623072
  • Pipeline finished with Failed
    about 1 month ago
    Total: 144s
    #623081
  • Pipeline finished with Failed
    about 1 month ago
    Total: 163s
    #623092
  • Pipeline finished with Failed
    about 1 month ago
    Total: 626s
    #623096
  • Pipeline finished with Failed
    about 1 month ago
    Total: 2456s
    #623111
  • Pipeline finished with Canceled
    about 1 month ago
    Total: 373s
    #623148
  • Pipeline finished with Failed
    about 1 month ago
    Total: 557s
    #623158
  • Pipeline finished with Failed
    about 1 month ago
    Total: 591s
    #623178
  • Pipeline finished with Success
    about 1 month ago
    Total: 665s
    #623203
  • Pipeline finished with Failed
    29 days ago
    #625116
  • Pipeline finished with Failed
    29 days ago
    Total: 350s
    #625157
  • Pipeline finished with Failed
    29 days ago
    Total: 703s
    #625162
  • Pipeline finished with Success
    3 days ago
    Total: 442s
    #651915
Production build 0.71.5 2024